Skip to content

Commit

Permalink
Fixed previous userlist change.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwoberts committed Oct 2, 2024
1 parent cbbcbac commit 7deaca6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/handlers/signup.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func CreateTenant() web.HandlerFunc {

// Handle userlist.
if env.Config.UserList.Enabled {
c.Enqueue(tasks.UserListCreateCompany(*c.Tenant(), *user))
c.Enqueue(tasks.UserListCreateCompany(*createTenant.Result, *user))
}

return c.Ok(web.Map{})
Expand Down
6 changes: 6 additions & 0 deletions app/handlers/signup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ func TestCreateTenantHandler_SingleHost_WithSocialAccount(t *testing.T) {
var newTenant *cmd.CreateTenant
bus.AddHandler(func(ctx context.Context, c *cmd.CreateTenant) error {
newTenant = c
newTenant.Result = &entity.Tenant{
ID: 1,
Name: c.Name,
Subdomain: c.Subdomain,
Status: enum.TenantActive,
}
return nil
})

Expand Down

0 comments on commit 7deaca6

Please sign in to comment.