Mostra il link di disiscrizione dopo la conferma newsletter.

Passa il token unsub alla pagina di conferma e lo include anche nell'email di double opt-in.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Javaxman
2026-07-29 14:45:54 +02:00
parent 6ba58c3a86
commit 770db3067d
3 changed files with 40 additions and 4 deletions

View File

@ -79,5 +79,8 @@ export const GET: APIRoute = async ({ request, locals, url }) => {
}
}
return Response.redirect(new URL(okPath, request.url).toString(), 303);
return Response.redirect(
new URL(`${okPath}?unsub=${encodeURIComponent(row.unsubscribe_token)}`, request.url).toString(),
303,
);
};