Skip to content

Commit

Permalink
yet more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-lehnen-rc committed Jan 9, 2024
1 parent a074ae2 commit 1ee828a
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions apps/meteor/client/providers/UserProvider/UserProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ type UserProviderProps = {
children: ReactNode;
};

const find = (...args: any[]) => {
console.log('DEBUGOAUTH', new Date().toISOString(), 'find on service configurations');
const results = ServiceConfiguration.configurations.find(...args).fetch();

console.log('DEBUGOAUTH', new Date().toISOString(), 'results', results?.length);
return results;
};

const UserProvider = ({ children }: UserProviderProps): ReactElement => {
const isLdapEnabled = useSetting<boolean>('LDAP_Enable');
const isCrowdEnabled = useSetting<boolean>('CROWD_Enable');
Expand Down Expand Up @@ -142,26 +150,23 @@ const UserProvider = ({ children }: UserProviderProps): ReactElement => {
});
},
queryAllServices: createReactiveSubscriptionFactory(() =>
ServiceConfiguration.configurations
.find(
{
showButton: { $ne: false },
find(
{
showButton: { $ne: false },
},
{
sort: {
service: 1,
},
{
sort: {
service: 1,
},
},
)
.fetch()
.map(
({ appId: _, ...service }) =>
({
title: capitalize(String((service as any).service || '')),
...service,
...(config[(service as any).service] ?? {}),
} as any),
),
},
).map(
({ appId: _, ...service }) =>
({
title: capitalize(String((service as any).service || '')),
...service,
...(config[(service as any).service] ?? {}),
} as any),
),
),
}),
[userId, user, loginMethod],
Expand Down

0 comments on commit 1ee828a

Please sign in to comment.