From 64d361fa237c8481966c4327946c16e88836db42 Mon Sep 17 00:00:00 2001 From: Sebastian Hierholzer Date: Thu, 7 Dec 2023 13:25:34 +0100 Subject: [PATCH] fix: undefined variables failing to parse --- pages/api/v1/logins/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/api/v1/logins/index.ts b/pages/api/v1/logins/index.ts index c592451..b5efab8 100644 --- a/pages/api/v1/logins/index.ts +++ b/pages/api/v1/logins/index.ts @@ -231,8 +231,8 @@ export function getLogins() { } return { credentialsEnabled: (process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED === 'true' || process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED === undefined) ? "true" : "false", - emailEnabled: process.env.NEXT_PUBLIC_EMAIL_PROVIDER, - registrationDisabled: process.env.NEXT_PUBLIC_DISABLE_REGISTRATION, + emailEnabled: (process.env.NEXT_PUBLIC_EMAIL_PROVIDER === 'true' ? 'true' : 'false'), + registrationDisabled: (process.env.NEXT_PUBLIC_DISABLE_REGISTRATION === 'true' ? 'true' : 'false'), buttonAuths: buttonAuths }; } \ No newline at end of file