Ejemplo n.º 1
0
        public async Task <string> Handle(RegistrationCommand request, CancellationToken cancellation)
        {
            User user = _converter.ConvertUserFromDTO(request.DTO);

            await _repo.InsertUserIntoTheDb(user);

            var token = await _manager.Authorize(user.Email, request.DTO.Password, cancellation);

            return(token);
        }