public async Task <IHttpActionResult> EditType(KudosTypeViewModel model) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var dto = _mapper.Map <KudosTypeViewModel, KudosTypeDto>(model); SetOrganizationAndUser(dto); try { await _kudosService.UpdateKudosTypeAsync(dto); return(Ok()); } catch (ValidationException e) { return(BadRequestWithError(e)); } }