mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
test: fix spec
This commit is contained in:
@@ -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
|
||||||
@@ -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 });
|
||||||
|
|||||||
Reference in New Issue
Block a user