示例#1
0
        public async Task <IActionResult> Update([FromBody] UpdateLogNoteModel model)
        {
            try
            {
                await _logNoteService.Update(model);

                return(Ok());
            }
            catch (Exception e)
            {
                return(HandleException(e));
            }
        }
示例#2
0
        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));
        }