def deleteNote(payload, req): uid = UR.getUserId(req) #print "trying to delete %s" %( payload["id_comment"],) if not auth.canDelete(uid, payload["id_comment"]): return UR.prepare_response({}, 1, "NOT ALLOWED") else: annotations.deleteNote(payload) return UR.prepare_response({"id_comment": payload["id_comment"] })