Пример #1
0
        public async Task <IHttpActionResult> EditType(int id)
        {
            if (id < 1)
            {
                return(BadRequest());
            }

            try
            {
                var dto = await _kudosService.GetKudosType(id, GetUserAndOrganization());

                var result = _mapper.Map <KudosTypeDTO, KudosTypeViewModel>(dto);

                return(Ok(result));
            }
            catch (ValidationException e)
            {
                return(BadRequestWithError(e));
            }
        }