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()
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()