def UserSignUp():
    if request.method == 'POST':
        print("REQUEST: ", request.json)
        return UsersHandler().insertUserSignUpJson(request.json)
    else:
        if not request.args:
            return UsersHandler().getAllUsers()
Пример #2
0
def getAllUsers():

    if request.method == 'POST':

        print("REQUEST", request.json)
        return UsersHandler().insertUserJSON(request.json)
    else:

        return UsersHandler().getAllUsersInfo()
Пример #3
0
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()
Пример #4
0
def updateUser(uid):
    """
    :param uid: user id
    :return: Edit user information
    """
    print("REQUEST", request.json)
    return UsersHandler().updateUser(uid, request.json)
Пример #5
0
def deleteUser(uID):
    """
    :param uID: user id
    :return:  Search all the user information using its email as identifier
    """
    return UsersHandler().deleteUser(uID)
Пример #6
0
def getUser():
    """
    :return: Search all the user information using its email as identifier
    """
    print("Request", request.json)
    return UsersHandler().getUser(request.json)
Пример #7
0
def getAllExOfficioStudentSenators():
    """
    :return: Search all Ex-Officio student senators
    """
    return UsersHandler().getAllExOfficioStudentsSenator()
Пример #8
0
def getAllExOfficioSenators():
    """
    :return: Search all ex-officio senators
    """
    return UsersHandler().getAllExOfficioSenator()
Пример #9
0
def getAllElectStudentSenators():
    """
    :return: Search all elect student senators
    """
    return UsersHandler().getAllElectStudentsSenator()
Пример #10
0
def getAllElectStudentSenators():
    return UsersHandler().getAllElectStudentsSenator()
Пример #11
0
def updateUser(uid):
    print("REQUEST", request.json)
    return UsersHandler().updateUser(uid, request.json)
Пример #12
0
def deleteUser(uID):

    return UsersHandler().deleteUser(uID)
Пример #13
0
def getUser():

    print("Request", request.json)
    return UsersHandler().getUserByEmail(request.json)
Пример #14
0
def getAllExOfficioStudentSenators():
    return UsersHandler().getAllExOfficioStudentsSenator()
Пример #15
0
def getAllSenators():
    """
    :return: Search all senators including the chancellor
    """
    return UsersHandler().getAllSenator()
def usersByID(userid):
    if request.method == 'GET':
        return UsersHandler().getUserById(userid)
Пример #17
0
def getAllSenators():
    return UsersHandler().getAllSenator()