def markNote(payload, req): uid = UR.getUserId(req) id_comment = payload["id_comment"] if not auth.canMark(uid,id_comment ): return UR.prepare_response({}, 1, "NOT ALLOWED") else: annotations.markNote(uid, payload); comments = annotations.getComment(id_comment,uid) p = {"locations":annotations.getLocation(comments[int(id_comment)]["ID_location"]), "marks": annotations.getMark(uid, payload), "comments": comments} return UR.prepare_response(p)