From 1f3f3ae9570a0d056aff7a08a5e9d3ae26ad5876 Mon Sep 17 00:00:00 2001 From: TZGyn Date: Thu, 1 Aug 2024 10:47:47 +0800 Subject: [PATCH] update enable custom domain to check if email verification only if there is a mail provider --- .../src/routes/(app)/projects/[id]/settings/+page.server.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/(app)/projects/[id]/settings/+page.server.ts b/frontend/src/routes/(app)/projects/[id]/settings/+page.server.ts index 78ce8a5..0000746 100644 --- a/frontend/src/routes/(app)/projects/[id]/settings/+page.server.ts +++ b/frontend/src/routes/(app)/projects/[id]/settings/+page.server.ts @@ -121,7 +121,11 @@ export const actions: Actions = { const userId = event.locals.user.id - if (!event.locals.user.email_verified) { + if ( + !event.locals.user.email_verified && + env.PRIVATE_MAIL_PROVIDER && + env.PRIVATE_MAIL_PROVIDER !== '' + ) { return setError( form, 'enableDomain',