test: fix spec

This commit is contained in:
Barış Soner Uşaklı
2024-08-26 14:52:30 -04:00
parent 01a2f0e730
commit 5fa8ddbcf9
2 changed files with 4 additions and 1 deletions

View File

@@ -24,6 +24,9 @@ get:
error: error:
type: string type: string
description: Translation key for client-side localisation description: Translation key for client-side localisation
alreadyValidated:
type: boolean
description: set to true if the email was already validated
required: required:
- title - title
- $ref: ../../components/schemas/CommonProps.yaml#/CommonProps - $ref: ../../components/schemas/CommonProps.yaml#/CommonProps

View File

@@ -227,7 +227,7 @@ Controllers.confirmEmail = async (req, res) => {
}); });
} }
try { try {
if (req.uid) { if (req.loggedIn) {
const emailValidated = await user.getUserField(req.uid, 'email:confirmed'); const emailValidated = await user.getUserField(req.uid, 'email:confirmed');
if (emailValidated) { if (emailValidated) {
return renderPage({ alreadyValidated: true }); return renderPage({ alreadyValidated: true });