def approveNote(payload, req): uid = UR.getUserId(req) id_comment = payload["id_comment"] if not auth.canApprove(uid,id_comment ): return UR.prepare_response({}, 1, "NOT ALLOWED") else: annotations.approveNote(uid, payload); p = {"comments":annotations.getComment(id_comment,uid) } return UR.prepare_response(p) annotations.addApproveHistory(uid, payload)
def approveNote(payload, req): uid = UR.getUserId(req) id_comment = payload["id_comment"] if not auth.canApprove(uid,id_comment ): return UR.prepare_response({}, 1, "NOT ALLOWED") else: annotations.approveNote(uid, payload); p = {"comments":annotations.getComment(id_comment,uid) } return UR.prepare_response(p) annotations.addApproveHistory(uid, payload)