예제 #1
0
            public async Task <Result <LoginOutputModel> > Handle(
                LoginUserCommand request,
                CancellationToken cancellationToken)
            {
                var result = await this.identity.Login(request);

                if (!result.Succeeded)
                {
                    return(result.Errors);
                }

                var user = result.Data;

                var dealerId = await this.dealerRepository.GetDealerId(user.UserId, cancellationToken);

                return(new LoginOutputModel(dealerId, user.Token));
            }
예제 #2
0
 public async Task <Result <LoginOutputModel> > Handle(
     LoginUserCommand request,
     CancellationToken cancellationToken)
 => await this.identity.Login(request);