From 5fcc365efbd50fee9fea42d00e0e3d5d3cbdf92a Mon Sep 17 00:00:00 2001 From: jamesread Date: Wed, 25 Sep 2024 23:56:50 +0100 Subject: [PATCH] feat: Dont send activate=true if activation isnt required --- apps/backend/src/api/routes/auth.controller.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/backend/src/api/routes/auth.controller.ts b/apps/backend/src/api/routes/auth.controller.ts index bd14422e..1a0a8af2 100644 --- a/apps/backend/src/api/routes/auth.controller.ts +++ b/apps/backend/src/api/routes/auth.controller.ts @@ -30,7 +30,9 @@ export class AuthController { getOrgFromCookie ); - if (body.provider === 'LOCAL') { + const activationRequired = body.provider === 'LOCAL' && !!process.env.RESEND_API_KEY; + + if (activationRequired) { response.header('activate', 'true'); response.status(200).json({ activate: true }); return;