def getRepliesByPostIDDETAILED(self, pID): dao = PostDAO() result = dao.getRepliesByPostID(pID) mapped_result = [] for r in result: mapped_result.append(mapReplyToDict(r)) return mapped_result
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)