Esempio n. 1
0
def getMessageByChatID(cid):
    #WORKSSS
    if request.method == 'GET':
        result = Message.getAllChatMessages(cid)
        return result
    elif request.method == 'POST':
        result = Message.insertMessage(request.json)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 2
0
def getAllLikes():
    #WORKS
    if request.method == 'GET':
        result = Message.getAllLikes()
        return result
    elif request.method == 'POST':
        result = Message.insertLikeDislike(request.json)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 3
0
def getMessageLikeReactionsCountByID(mid):
    #WORKS
    if request.method == 'GET':
        result = Message.getMessageLikesCountByID(mid)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 4
0
def getUserReactions(uid):
    #WORKS
    if request.method == 'GET':
        result = Message.getUserReactions(uid)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 5
0
def getUserMediaByID(uid):
    #WORKS
    if request.method == 'GET':
        result = Message.getAllMediaByUser(uid)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 6
0
def getAllMedia():
    #WORKS
    if request.method == 'GET':
        result = Message.getAllMedias()
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 7
0
def getChatTopicsByID(cid):
    #WORKS
    if request.method == 'GET':
        result = Message.getChatTopicByID(cid)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 8
0
def getMessageInChatByUser(cid, uid):
    #WORKSSS
    if request.method == 'GET':
        result = Message.getAllUserMessagesInChat(uid, cid)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 9
0
def getMessageInChat(cid):
    #WORKSSS
    if request.method == 'POST':
        result = Message.searchAllChatMessage(cid, request.json)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 10
0
def getActiveMessageByChatID(cid):
    #WORKS
    if request.method == 'GET':
        result = Message.getAllChatactiveMessages(cid)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 11
0
def getMessageDisLikeReactionsCountByID(mid):
    #WORKS
    #displays a positive number
    if request.method == 'GET':
        result = Message.getMessageDislikesCountByID(mid)
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 12
0
def getDisikesPerDay():
    if request.method == 'GET':
        result = Message.getDislikesPerDay()
        return result
    else:
        return jsonify(Error="Method not allowed"), 404
Esempio n. 13
0
def getAllTopics():
    if request.method == 'GET':
        result = Message.getAllTopics()
        return result
    else:
        return jsonify(Error="Method not allowed"), 404