コード例 #1
0
        public async Task <IHttpActionResult> GetApprovedKudosList(string id = null)
        {
            id ??= User.Identity.GetUserId();

            try
            {
                var userKudosInformationDto = await _kudosService.GetApprovedKudosListAsync(id, GetUserAndOrganization().OrganizationId);

                var result = _mapper.Map <IEnumerable <UserKudosInformationDto>, IEnumerable <UserKudosInformationViewModel> >(userKudosInformationDto);
                return(Ok(result));
            }
            catch (ValidationException e)
            {
                return(BadRequestWithError(e));
            }
        }