feat: Dont send activate=true if activation isnt required

This commit is contained in:
jamesread 2024-09-25 23:56:50 +01:00
parent c84d8af915
commit 5fcc365efb
1 changed files with 3 additions and 1 deletions

View File

@ -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;