Example #1
0
 def getReplyByID(self, id):
     dao = ReplyDAO()
     result = dao.getReplyById(id)
     if result == None:
         return jsonify(Error="REPLY NOT FOUND")
     else:
         mapped = self.mapToDict2(result)
         return jsonify(Reply=mapped)
Example #2
0
 def getReplyByID2(self, id):
     dao = ReplyDAO()
     dao1 = UserDAO()
     dao2 = MessageDAO()
     result = dao.getReplyById(id)
     if result == None:
         return jsonify(Error="REPLY NOT FOUND")
     else:
         result1 = dao1.getUserById(result[1])
         result2 = dao2.getMessageById(result[2])
         result[1] = result1[1] + " " + result1[2]
         result[2] = result2[1]
         mapped = self.mapToDict2(result)
         return jsonify(Reply=mapped)