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