fix #911: redirect verify email visits to dashboard
This commit is contained in:
Родитель
3d9a1735aa
Коммит
d7a3b6efda
|
@ -206,13 +206,7 @@ async function verify(req, res) {
|
|||
await _verify(req);
|
||||
}
|
||||
|
||||
res.render("subpage", {
|
||||
headline: req.fluentFormat("confirmation-headline"),
|
||||
subhead: req.fluentFormat("confirmation-blurb"),
|
||||
title: req.fluentFormat("user-verify-title"),
|
||||
whichPartial: "subpages/confirm",
|
||||
emailLinks: EmailUtils.getShareByEmail(req),
|
||||
});
|
||||
res.redirect("/user/dashboard");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ test("user verify request with valid token verifies user", async () => {
|
|||
// Call code-under-test
|
||||
await user.verify(req, resp);
|
||||
|
||||
expect(resp.statusCode).toEqual(200);
|
||||
expect(resp.statusCode).toEqual(302);
|
||||
const emailAddress = await DB.getEmailByToken(validToken);
|
||||
expect(emailAddress.verified).toBeTruthy();
|
||||
});
|
||||
|
@ -189,7 +189,7 @@ test("user verify request for already verified user doesn't send extra email", a
|
|||
// Call code-under-test
|
||||
await user.verify(mockRequest, resp);
|
||||
|
||||
expect(resp.statusCode).toEqual(200);
|
||||
expect(resp.statusCode).toEqual(302);
|
||||
const emailAddress = await DB.getEmailByToken(alreadyVerifiedToken);
|
||||
expect(emailAddress.verified).toBeTruthy();
|
||||
expect(EmailUtils.sendEmail).not.toHaveBeenCalled();
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<p>WIP // TODO : Redirect to <a href="/">User Dashboard </a>on Email Confirmation.</p>
|
Загрузка…
Ссылка в новой задаче