예제 #1
0
 public UserService(
     IRestUserService restUserService,
     IEtherscanApiClient etherscanApi
     )
 {
     Guard.NotNull(restUserService, nameof(restUserService));
     _restService  = restUserService;
     _etherscanApi = etherscanApi;
 }
예제 #2
0
        public async Task <ActionResult <TicketDto> > GetTicket(int id, [FromServices] IAdService adService, [FromServices] IRestUserService restUserService)
        {
            //id = 22222; //test
            if (id < 1)
            {
                return(BadRequest());
            }
            _logger.LogInformation(ApiLogEvents.GetItem, $"{nameof(GetTicket)} with {id} Started");

            var repoObj = await _repository.GetId(id).ConfigureAwait(false);

            if (repoObj == null)
            {
                //return NotFound();
                throw new Core.NotFoundException($"{nameof(GetTicket)}", id);
            }

            var result = _mapper.Map <TicketDto>(repoObj);

            return(Ok(result));
        }
예제 #3
0
 public ClaimsTransformation(IRestUserService restUserService)
 {
     _restUserService = restUserService;
 }