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
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
def getMessageLikeReactionsCountByID(mid): #WORKS if request.method == 'GET': result = Message.getMessageLikesCountByID(mid) return result else: return jsonify(Error="Method not allowed"), 404
def getUserReactions(uid): #WORKS if request.method == 'GET': result = Message.getUserReactions(uid) return result else: return jsonify(Error="Method not allowed"), 404
def getUserMediaByID(uid): #WORKS if request.method == 'GET': result = Message.getAllMediaByUser(uid) return result else: return jsonify(Error="Method not allowed"), 404
def getAllMedia(): #WORKS if request.method == 'GET': result = Message.getAllMedias() return result else: return jsonify(Error="Method not allowed"), 404
def getChatTopicsByID(cid): #WORKS if request.method == 'GET': result = Message.getChatTopicByID(cid) return result else: return jsonify(Error="Method not allowed"), 404
def getMessageInChatByUser(cid, uid): #WORKSSS if request.method == 'GET': result = Message.getAllUserMessagesInChat(uid, cid) return result else: return jsonify(Error="Method not allowed"), 404
def getMessageInChat(cid): #WORKSSS if request.method == 'POST': result = Message.searchAllChatMessage(cid, request.json) return result else: return jsonify(Error="Method not allowed"), 404
def getActiveMessageByChatID(cid): #WORKS if request.method == 'GET': result = Message.getAllChatactiveMessages(cid) return result else: return jsonify(Error="Method not allowed"), 404
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
def getDisikesPerDay(): if request.method == 'GET': result = Message.getDislikesPerDay() return result else: return jsonify(Error="Method not allowed"), 404
def getAllTopics(): if request.method == 'GET': result = Message.getAllTopics() return result else: return jsonify(Error="Method not allowed"), 404