Skip to content

Commit

Permalink
logs on testing
Browse files Browse the repository at this point in the history
  • Loading branch information
psiddharthdesign committed Jul 22, 2024
1 parent df290a6 commit f87caaa
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,25 @@ async function getDefaultOrganizationOrSet(): Promise<string | null> {
fetchSlimOrganizations(),
getDefaultOrganization(),
]);
console.log('slimOrganizations on onboarding', slimOrganizations);
const firstOrganization = slimOrganizations[0];

console.log('firstOrganization on onboarding', firstOrganization);
if (defaultOrganizationId) {
console.log('defaultOrganizationId on onboarding', defaultOrganizationId);
return defaultOrganizationId;
}

if (!firstOrganization) {
console.log('no firstOrganization on onboarding');
return null;
}

// if the user has an organization already for some
// reason, because of an invite or for some other reason,
// make sure that the default organization is set to the first
await setDefaultOrganization(firstOrganization.id);
console.log('set default organization to firstOrganization on onboarding', firstOrganization.id);

return firstOrganization.id;
}
Expand All @@ -35,6 +40,8 @@ async function getOnboardingConditions(userId: string) {
getDefaultOrganizationOrSet(),
]);

console.log('userProfile on onboarding', userProfile);
console.log('defaultOrganizationId on onboarding', defaultOrganizationId);
return {
userProfile,
defaultOrganizationId,
Expand Down

0 comments on commit f87caaa

Please sign in to comment.