Repository navigation
Collector: an unsubscribe page for email written by hand (genclass.dev/unsubscribe) - #262
Merged
Merged
Conversation
…v/unsubscribe) A form with one field. A post saves the address (lower case) in a new table, unsubscribes (migration 0024), and answers the same whether or not it was already there. No sign-in; nothing is sent to the typed address; no account or report setting changes. A new address sends one notice to UNSUBSCRIBE_NOTIFY through the EMAIL binding, at most 50 a day. AUTH_LIMIT per network. The link in a signature was a mailto before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
genclass.dev/unsubscribe: a form with one field, for the email a person at GenClass writes by hand. The link in their signature was amailto:before.GET /unsubscribeshows the form;POST /unsubscribe(the form, or JSON{ email }) saves the address, lower case, in a new tableunsubscribes(migration 0024) and shows "You are unsubscribed"./api/report/unsubscribe).UNSUBSCRIBE_NOTIFY(set inwrangler.toml) through theEMAILbinding, at most 50 a day, so whoever writes that email sees it before writing again.AUTH_LIMITper network. 400 for something that is not an address; 503 with a contact when the table is missing.wrangler.toml:genclass.dev/unsubscribe*.Migration number: 0024, because #242 (partner API) uses 0023.
Checks
telemetry-worker:npx vitest run, 36 files, 938 tests pass (14 new intest/unsubscribe.test.ts).To go live
wrangler d1 migrations apply genclass-dashboard --remote(0024).https://genclass.dev/unsubscribe.🤖 Generated with Claude Code