Exemple #1
0
        public async Task Handle(SetPasswordCommand request, CancellationToken cancellationToken)
        {
            if (!request.IsValid())
            {
                NotifyValidationErrors(request);
                return;
            }

            var result = await _userService.CreatePasswordAsync(request);

            if (result)
            {
                await Bus.RaiseEvent(new PasswordCreatedEvent(request.Id.Value));
            }
        }