Skip to content

Commit

Permalink
feat: Dont send activate=true if activation isnt required
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesread committed Sep 25, 2024
1 parent c84d8af commit 5fcc365
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/backend/src/api/routes/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5fcc365

Please sign in to comment.