Exemple #1
0
def remove_note_impl(args):
    try:
        note = note_from_id(args['note_id'])
        db.session.delete(note)
        db.session.commit()
        return Response(True, "", None).output()
    except Exception, e:
        return Response(False, str(e), None).output()
Exemple #2
0
def remove_note_impl(args):
    try:
        note = note_from_id(args['note_id'])
        db.session.delete(note)
        db.session.commit()
        return Response(True, "", None).output()
    except Exception, e:
        return Response(False, str(e), None).output()
Exemple #3
0
def update_note_impl(args):
    try:
        note = note_from_id(args['note_id'])
        note.text = args['text']
        db.session.commit()
        return Response(True, "", NoteSchema().dumps(note).data).output()
    except Exception, e:
        return Response(False, str(e), None).output()
Exemple #4
0
def update_note_impl(args):
    try:
        note = note_from_id(args['note_id'])
        note.text = args['text']
        db.session.commit()
        return Response(True, "", NoteSchema().dumps(note).data).output()
    except Exception, e:
        return Response(False, str(e), None).output()