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)); }
public async Task <Result <LoginOutputModel> > Handle( LoginUserCommand request, CancellationToken cancellationToken) => await this.identity.Login(request);