style(oidc): if instead of return with ternary expression

This commit is contained in:
KernelDeimos
2026-02-19 17:18:48 -05:00
parent 4e01608e4a
commit 0112f097db
+6 -3
View File
@@ -96,9 +96,12 @@ extension.get('/whoami', { subdomain: 'api' }, async (req, res, next) => {
const providers = await svc_oidc.getEnabledProviderIds();
const origin = (svc_oidc.global_config?.origin || '').replace(/\/$/, '');
const provider = providers && providers[0];
return provider
? { oidc_revalidate_url: `${origin}/auth/oidc/${provider}/start?flow=revalidate&user_id=${req.user.id}` }
: {};
if ( provider ) {
return {
oidc_revalidate_url: `${origin}/auth/oidc/${provider}/start?flow=revalidate&user_id=${req.user.id}`,
};
}
return {};
} catch ( _e ) {
return {};
}