def getAllUsers(): if request.method == 'GET': result = User.getAllUsers() return result elif request.method == 'POST': result = User.addUser(request.json) return result else: return jsonify(Error="Method not allowed"), 404
def getUserContactsByID(uid): if request.method == 'GET': result = User.getUserContacts(uid) return result elif request.method == 'POST': result = User.addContact(request.json) return result else: return jsonify(Error="Method not allowed"), 404
def loginCredentials(): if request.method == 'POST': print("REQUEST: ", request.json) result = User.loginUser(request.json) else: result = jsonify(Error="method not allowed"), 404 return result
def getCredentials(): if request.method == 'GET': result = User.getAllCredentials() return result else: return jsonify(Error="Method not allowed"), 404
def getAdminByChatID(cid): if request.method == 'GET': result = User.getAdminByChatID(cid) return result else: return jsonify(Error="Method not allowed"), 404
def getUsersByDisLikedMessage(mid): if request.method == 'GET': result = User.getUsersByDislikedMessage(mid) return result else: return jsonify(Error="Method not allowed"), 404
def getUsersPerDay(): if request.method == 'GET': result = User.getUsersPerDay() return result else: return jsonify(Error="Method not allowed"), 404
def getAllUsersByActivity(): if request.method == 'GET': result = User.getActiveUsers() return result else: return jsonify(Error="Method not allowed"), 404
def getUserByID(uid): if request.method == 'GET': result = User.getUserInfo(uid) return result else: return jsonify(Error="Method not allowed"), 404
def searchAllParticipants(uid): if request.method == 'POST': result = User.searchAllContact(uid, request.json) return result else: return jsonify(Error="Method not allowed"), 404
def searchAllContacts(): if request.method == 'POST': result = User.searchAllUser(request.json) return result else: return jsonify(Error="Method not allowed"), 404