Skip to content

Commit

Permalink
needn't create workspace for existing user
Browse files Browse the repository at this point in the history
  • Loading branch information
deleteLater committed Nov 17, 2023
1 parent 3b5f47c commit c4ee6e6
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions modules/back-end/src/Application/Identity/LoginByEmail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,7 @@ public async Task<LoginResult> Handle(LoginByEmail request, CancellationToken ca
}

var workspaces = await _userService.GetWorkspacesAsync(request.Email);
if (!workspaces.Any())
{
// if there is no workspace associated with the user, create one
workspaceId = await CreateWorkspaceAsync();
}
else
{
workspaceId = workspaces.First().Id;
}
workspaceId = workspaces.First().Id;

return await _identityService.LoginByEmailAsync(workspaceId, request.Email, request.Password);

Expand Down

0 comments on commit c4ee6e6

Please sign in to comment.