def UserSignUp(): if request.method == 'POST': print("REQUEST: ", request.json) return UsersHandler().insertUserSignUpJson(request.json) else: if not request.args: return UsersHandler().getAllUsers()
def getAllUsers(): if request.method == 'POST': print("REQUEST", request.json) return UsersHandler().insertUserJSON(request.json) else: return UsersHandler().getAllUsersInfo()
def getAllUsers(): """ :return: Search all the info from users registered """ if request.method == 'POST': print("REQUEST", request.json) return UsersHandler().insertUserJSON(request.json) else: return UsersHandler().getAllUsersInfo()
def updateUser(uid): """ :param uid: user id :return: Edit user information """ print("REQUEST", request.json) return UsersHandler().updateUser(uid, request.json)
def deleteUser(uID): """ :param uID: user id :return: Search all the user information using its email as identifier """ return UsersHandler().deleteUser(uID)
def getUser(): """ :return: Search all the user information using its email as identifier """ print("Request", request.json) return UsersHandler().getUser(request.json)
def getAllExOfficioStudentSenators(): """ :return: Search all Ex-Officio student senators """ return UsersHandler().getAllExOfficioStudentsSenator()
def getAllExOfficioSenators(): """ :return: Search all ex-officio senators """ return UsersHandler().getAllExOfficioSenator()
def getAllElectStudentSenators(): """ :return: Search all elect student senators """ return UsersHandler().getAllElectStudentsSenator()
def getAllElectStudentSenators(): return UsersHandler().getAllElectStudentsSenator()
def updateUser(uid): print("REQUEST", request.json) return UsersHandler().updateUser(uid, request.json)
def deleteUser(uID): return UsersHandler().deleteUser(uID)
def getUser(): print("Request", request.json) return UsersHandler().getUserByEmail(request.json)
def getAllExOfficioStudentSenators(): return UsersHandler().getAllExOfficioStudentsSenator()
def getAllSenators(): """ :return: Search all senators including the chancellor """ return UsersHandler().getAllSenator()
def usersByID(userid): if request.method == 'GET': return UsersHandler().getUserById(userid)
def getAllSenators(): return UsersHandler().getAllSenator()