Ejemplo n.º 1
0
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"] })
Ejemplo n.º 2
0
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"] })