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)
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)