Exemple #1
0
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
Exemple #2
0
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
Exemple #3
0
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
Exemple #4
0
def getCredentials():
    if request.method == 'GET':
        result = User.getAllCredentials()
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Exemple #5
0
def getAdminByChatID(cid):
    if request.method == 'GET':
        result = User.getAdminByChatID(cid)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Exemple #6
0
def getUsersByDisLikedMessage(mid):
    if request.method == 'GET':
        result = User.getUsersByDislikedMessage(mid)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Exemple #7
0
def getUsersPerDay():
    if request.method == 'GET':
        result = User.getUsersPerDay()
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Exemple #8
0
def getAllUsersByActivity():
    if request.method == 'GET':
        result = User.getActiveUsers()
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Exemple #9
0
def getUserByID(uid):
    if request.method == 'GET':
        result = User.getUserInfo(uid)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Exemple #10
0
def searchAllParticipants(uid):
    if request.method == 'POST':
        result = User.searchAllContact(uid, request.json)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Exemple #11
0
def searchAllContacts():
    if request.method == 'POST':
        result = User.searchAllUser(request.json)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404