public async Task<IActionResult> Edit(CategoryEditModel model) { var request = new UpdateCatRequest { RouteName = model.RouteName, Note = model.Note, DisplayName = model.DisplayName }; await _catService.UpdateAsync(model.Id, request); return Ok(model); }
public async Task <IActionResult> Edit(CategoryEditModel model) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var request = new UpdateCatRequest { RouteName = model.RouteName, Note = model.Note, DisplayName = model.DisplayName }; await _catService.UpdateAsync(model.Id, request); return(Ok(model)); }