This commit is contained in:
@@ -71,7 +71,8 @@ router.post('/register', async (req, res) => {
|
||||
try { appName = JSON.parse(brandingSetting.value).appName || appName; } catch {}
|
||||
}
|
||||
|
||||
await sendVerificationEmail(email.toLowerCase(), display_name, verifyUrl, appName);
|
||||
sendVerificationEmail(email.toLowerCase(), display_name, verifyUrl, appName)
|
||||
.catch(err => console.error('Verification mail failed (non-fatal):', err.message));
|
||||
|
||||
return res.status(201).json({ needsVerification: true, message: 'Verification email has been sent' });
|
||||
}
|
||||
@@ -163,7 +164,9 @@ router.post('/resend-verification', async (req, res) => {
|
||||
try { appName = JSON.parse(brandingSetting.value).appName || appName; } catch {}
|
||||
}
|
||||
|
||||
await sendVerificationEmail(email.toLowerCase(), user.display_name || user.name, verifyUrl, appName);
|
||||
// Fire-and-forget — do not await so SMTP timeouts don't fail the request
|
||||
sendVerificationEmail(email.toLowerCase(), user.display_name || user.name, verifyUrl, appName)
|
||||
.catch(err => console.error('Resend verification mail failed (non-fatal):', err.message));
|
||||
|
||||
res.json({ message: 'If an account exists, a new email has been sent.' });
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user