fix: Handle newsletter unsubscribe
There were a few issues with the newsletter unsubscribe links that we sent out in the newsletter. They were pointing to the backend for one thing. Also updated the frontend pages to handle unsubscribe from both users and subscribers.
This commit is contained in:
parent
f8feb5cf8b
commit
9208fb9a3c
10 changed files with 71 additions and 36 deletions
|
@ -115,7 +115,9 @@ const send = async (test = true) => {
|
|||
if (l > 0) {
|
||||
const body = mustache.render(template, {
|
||||
...i18n[lang],
|
||||
unsubscribe: `${backend}newsletter/unsubscribe/${sub.ehash}`,
|
||||
unsubscribe: `https://freesewing.org${
|
||||
lang === 'en' ? '/' : '/' + lang + '/'
|
||||
}newsletter/unsubscribe?x=${sub.ehash}`,
|
||||
content,
|
||||
})
|
||||
console.log(`[${lang}] ${l}/${subs} (${i}) Sending to ${sub.email}`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue