Split creators out of identity
This commit is contained in:
@@ -28,8 +28,10 @@ public class CreateUserCommandHandler : IRequestHandler<CreateUserCommand, IResu
|
||||
|
||||
var user = await _identityService.FindUserByEmailAsync(request.EmailAddress);
|
||||
|
||||
if (user is null) throw new InvalidOperationException("This should never happen, we just created the user.");
|
||||
|
||||
await _context.SaveChangesAsync(cancellationToken);
|
||||
|
||||
return Results.Ok(new Guid(user?.Id ?? string.Empty));
|
||||
return Results.Ok(user.Id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user