public IActionResult AddNote([FromBody] NoteModel noteModel) { if (noteModel?.Title?.Length > Limits.MAX_NOTE_TITLE) { throw new InputValueTooLargeException(); } if (noteModel?.Content?.Length > Limits.MAX_NOTE_CONTENT) { throw new InputValueTooLargeException(); } return(new JsonResult(NotesService.AddNote(PwdManService, GetToken(), noteModel))); }
public IActionResult DeleteNote(long id) { return(new JsonResult(NotesService.DeleteNote(PwdManService, GetToken(), id))); }
public IActionResult GetNotes() { return(new JsonResult(NotesService.GetNotes(PwdManService, GetToken()))); }