示例#1
0
 def getRepliesByPostIDDETAILED(self, pID):
     dao = PostDAO()
     result = dao.getRepliesByPostID(pID)
     mapped_result = []
     for r in result:
         mapped_result.append(mapReplyToDict(r))
     return mapped_result
示例#2
0
 def getRepliesByPostID(self, pID):
     dao = PostDAO()
     result = dao.getRepliesByPostID(pID)
     if not result:
         return jsonify(Error="Not found"), 404
     mapped_result = []
     for r in result:
         mapped_result.append(mapReplyToDict(r))
     return jsonify(mapped_result)