Exemplo n.º 1
0
 public IActionResult SetEntry([FromBody] DiaryEntryModel model)
 {
     if (model?.Entry?.Length > Limits.MAX_DIARY_ENTRY)
     {
         throw new InputValueTooLargeException();
     }
     DiaryService.SetEntry(PwdManService, GetToken(), model);
     return(new JsonResult(true));
 }
Exemplo n.º 2
0
 public IActionResult GetDays([FromQuery] DateTime date)
 {
     return(new JsonResult(DiaryService.GetDaysWithEntries(PwdManService, GetToken(), date)));
 }