mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 05:40:43 +01:00
feat: nicer error handling for bad jwt in unsubscribe template
This commit is contained in:
@@ -94,9 +94,9 @@
|
||||
"nodebb-plugin-spam-be-gone": "0.7.12",
|
||||
"nodebb-rewards-essentials": "0.2.1",
|
||||
"nodebb-theme-lavender": "5.3.2",
|
||||
"nodebb-theme-persona": "11.3.13",
|
||||
"nodebb-theme-persona": "11.3.16",
|
||||
"nodebb-theme-slick": "1.4.23",
|
||||
"nodebb-theme-vanilla": "12.1.15",
|
||||
"nodebb-theme-vanilla": "12.1.16",
|
||||
"nodebb-widget-essentials": "5.0.4",
|
||||
"nodemailer": "6.7.2",
|
||||
"nprogress": "0.2.0",
|
||||
|
||||
@@ -61,6 +61,8 @@
|
||||
"unsub.cta": "Click here to alter those settings",
|
||||
"unsubscribe": "unsubscribe",
|
||||
"unsub.success": "You will no longer receive emails from the <strong>%1</strong> mailing list",
|
||||
"unsub.failure.title": "Unable to unsubscribe",
|
||||
"unsub.failure.message": "Unfortunately, we were not able to unsubscribe you from the mailing list, as there was an issue with the link. However, you can alter your email preferences by going to <a href=\"%2\">your user settings</a>.<br /><br />(error: <code>%1</code>)",
|
||||
|
||||
"banned.subject": "You have been banned from %1",
|
||||
"banned.text1": "The user %1 has been banned from %2.",
|
||||
|
||||
@@ -149,10 +149,12 @@ settingsController.unsubscribe = async (req, res) => {
|
||||
}
|
||||
await doUnsubscribe(payload);
|
||||
res.render('unsubscribe', {
|
||||
payload: payload,
|
||||
payload,
|
||||
});
|
||||
} catch (err) {
|
||||
throw new Error(err);
|
||||
res.render('unsubscribe', {
|
||||
error: err.message,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user