Beispiel #1
0
 def getReactionsByUserID(self, uid):
     dao = ReactionDAO()
     result = dao.getReactionByUserId(uid)
     if result == None:
         return jsonify(Error="REACTION NOT FOUND")
     else:
         mapped_result = []
         for r in result:
            mapped_result.append(self.mapToDict(r))
         return jsonify(Reaction=mapped_result)
Beispiel #2
0
 def getReactionsByUserID(self, uid):
     dao = ReactionDAO()
     dao1 = MessageDAO()
     dao2 = UserDAO()
     result = dao.getReactionByUserId(uid)
     if result == None:
         return jsonify(Error="REACTION NOT FOUND")
     else:
         mapped_result = []
         for r in result:
             r[0] = dao1.getMessageById(r[0])[1]
             r[1] = dao2.getUserById(r[1])[1] + ' ' + dao2.getUserById(
                 r[1])[2]
             mapped_result.append(self.mapToDict(r))
         return jsonify(Reaction=mapped_result)