public async Task <IActionResult> Update([FromBody] UpdateLogNoteModel model) { try { await _logNoteService.Update(model); return(Ok()); } catch (Exception e) { return(HandleException(e)); } }
public async Task <IActionResult> Update([FromBody] UpdateLogNoteModel model) { return(await ProcessAsync(async() => { var logNote = new LogNoteModel { Id = model.Id, StudentId = model.StudentId, TypeId = model.TypeId, Message = model.Message }; var user = await UserService.GetUserByPrincipal(User); logNote.UpdatedById = user.Id; await _logNoteService.Update(logNote); return Ok("Log note updated successfully."); }, Permissions.Student.StudentLogNotes.EditLogNotes)); }