mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 15:11:10 +00:00
Improves code documentation
This commit is contained in:
1 parent
0f0038b0e3
commit
42a78a6077
3 files changed
+7
-6
No files matched your search
+4
-4
@@ -65,10 +65,10 @@ public class RegisterUserCommandHandler : IRequestHandler<RegisterUserCommand, E
|
||||
{
|
||||
// check if any users already exists (admin account is only set once!)
|
||||
IUserRepository userRepository = _unitOfWork.GetRepository<IUserRepository>();
|
||||
ErrorOr<UserEntity?> getUserRResult = await userRepository.GetByUsernameAsync(request.Username!, cancellationToken).ConfigureAwait(false);
|
||||
if (getUserRResult.IsError)
|
||||
return getUserRResult.Errors;
|
||||
else if (getUserRResult.Value is not null)
|
||||
ErrorOr<UserEntity?> getUserResult = await userRepository.GetByUsernameAsync(request.Username!, cancellationToken).ConfigureAwait(false);
|
||||
if (getUserResult.IsError)
|
||||
return getUserResult.Errors;
|
||||
else if (getUserResult.Value is not null)
|
||||
return Errors.Authentication.UsernameAlreadyExists;
|
||||
string? totpSecret = null;
|
||||
Guid id = Guid.NewGuid();
|
||||
|
||||
Reference in new issue
Block a user