Changeset 834bcc3 in Klonkt for src/routes/newsletter.js
- Timestamp:
- 06/23/2026 06:14:27 PM (3 months ago)
- Branches:
- main
- Children:
- d774679
- Parents:
- bb42dfb
- File:
-
- 1 edited
-
src/routes/newsletter.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/newsletter.js
rbb42dfb r834bcc3 1 1 /** 2 * N ieuwsbrief — publieke kant(premium feature #1).2 * Newsletter — public side (premium feature #1). 3 3 * 4 * GET /nieuwsbrief -> aanmeldformulier (premium; anders 404)5 * POST /nieuwsbrief -> aanmelden (double opt-in als SMTP er is)6 * GET /nieuwsbrief/bevestigen/:token -> opt-in bevestigen7 * GET /nieuwsbrief/uitschrijven/:token -> u itschrijven (ALTIJD toegestaan)4 * GET /nieuwsbrief -> sign-up form (premium; 404 otherwise) 5 * POST /nieuwsbrief -> subscribe (double opt-in if SMTP configured) 6 * GET /nieuwsbrief/bevestigen/:token -> confirm opt-in 7 * GET /nieuwsbrief/uitschrijven/:token -> unsubscribe (ALWAYS allowed) 8 8 * 9 * In hub -modus loopt dit via /user/:slug/nieuwsbrief (resolveSite zetsiteUrlBase).10 * Confirm -/unsub-links in de mail zijn absoluut(PUBLIC_BASE_URL + siteUrlBase).9 * In hub mode this runs via /user/:slug/nieuwsbrief (resolveSite sets siteUrlBase). 10 * Confirm/unsub links in the mail are absolute (PUBLIC_BASE_URL + siteUrlBase). 11 11 */ 12 12 … … 53 53 54 54 if (r.status === 'pending') { 55 // Double opt-in: s tuur de bevestigingsmail.55 // Double opt-in: send the confirmation email. 56 56 const link = fullUrl(req, res.locals.siteUrlBase, '/nieuwsbrief/bevestigen/' + r.token); 57 57 const unsub = fullUrl(req, res.locals.siteUrlBase, '/nieuwsbrief/uitschrijven/' + r.token); … … 81 81 }); 82 82 83 // U itschrijven mag altijd (ook als de premium-laag later uit zou gaan): een abonnee84 // moet zich altijd kunnen afmelden. Niet premium-gated.83 // Unsubscribe is always allowed (even if the premium layer is later disabled): a 84 // subscriber must always be able to opt out. Not premium-gated. 85 85 router.get('/nieuwsbrief/uitschrijven/:token', (req, res) => { 86 86 const ok = unsubscribe(req.params.token);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)