@@ -11,20 +11,25 @@ async function getDefaultOrganizationOrSet(): Promise<string | null> {
11
11
fetchSlimOrganizations ( ) ,
12
12
getDefaultOrganization ( ) ,
13
13
] ) ;
14
+ console . log ( 'slimOrganizations on onboarding' , slimOrganizations ) ;
14
15
const firstOrganization = slimOrganizations [ 0 ] ;
15
16
17
+ console . log ( 'firstOrganization on onboarding' , firstOrganization ) ;
16
18
if ( defaultOrganizationId ) {
19
+ console . log ( 'defaultOrganizationId on onboarding' , defaultOrganizationId ) ;
17
20
return defaultOrganizationId ;
18
21
}
19
22
20
23
if ( ! firstOrganization ) {
24
+ console . log ( 'no firstOrganization on onboarding' ) ;
21
25
return null ;
22
26
}
23
27
24
28
// if the user has an organization already for some
25
29
// reason, because of an invite or for some other reason,
26
30
// make sure that the default organization is set to the first
27
31
await setDefaultOrganization ( firstOrganization . id ) ;
32
+ console . log ( 'set default organization to firstOrganization on onboarding' , firstOrganization . id ) ;
28
33
29
34
return firstOrganization . id ;
30
35
}
@@ -35,6 +40,8 @@ async function getOnboardingConditions(userId: string) {
35
40
getDefaultOrganizationOrSet ( ) ,
36
41
] ) ;
37
42
43
+ console . log ( 'userProfile on onboarding' , userProfile ) ;
44
+ console . log ( 'defaultOrganizationId on onboarding' , defaultOrganizationId ) ;
38
45
return {
39
46
userProfile,
40
47
defaultOrganizationId,
0 commit comments