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