Esempio 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));
 }
Esempio n. 2
0
 public IActionResult GetDays([FromQuery] DateTime date)
 {
     return(new JsonResult(DiaryService.GetDaysWithEntries(PwdManService, GetToken(), date)));
 }