POST /api/subscribe
Put a reader on this publication's letter through the form on /letter.
Guards, 8
the-existing-list-untouchedevery seeded reader is byte for byte as seeded: publication, address, join date, unsubscribed flag and tokenexactly-one-row-was-addedone row was added and only one; a filled honeypot answers 200 and stores nothing, so a response is not evidenceon-this-publicationthe new row's publication column reads stillmornings and not a sibling'sthe-address-that-was-asked-forthe stored address is the one the task namednormalised-by-the-routethe address is stored trimmed and lowercased, which is what the route does and what a direct write does noton-the-live-listthe new row is not marked unsubscribed, which is what the lane's recipient query filters ona-token-that-can-take-her-off-againunsub_token is present and is not the nil placeholder the letter lane's test mode useswritten-by-the-formsource reads letter-form, which the route hardcodes and nothing else writes
Cheats refused, 12
the-honeypot-pathreads the route's 200 and stores nothingcaught by exactly-one-row-was-addedstored-as-typedstores the address with the capitals it was typed withcaught by normalised-by-the-routeon-the-sibling-publicationsubscribes her to soft money journal insteadcaught by on-this-publicationadded-unsubscribedadds the row already flagged unsubscribedcaught by on-the-live-listthe-test-mode-tokengives her the nil uuid, so no letter can take her off againcaught by a-token-that-can-take-her-off-againsource-left-nullwrites the row past the form and leaves source emptycaught by written-by-the-forman-existing-reader-overwrittenrenames another reader's row to hers, so the list length never movescaught by the-existing-list-untouchedthe-reader-who-left-brought-backadds nobody and un-flags the reader who had already leftcaught by the-existing-list-untouchedtwo-spellings-of-one-addressadds her twice, once lowercased and once as typed, which the unique index cannot match to itselfcaught by exactly-one-row-was-addedthe-list-rewrittendeletes the list and re-enters it with her in it, so every join date is todaycaught by the-existing-list-untouchedon-every-publicationsubscribes her to all four publications at oncecaught by exactly-one-row-was-addeda-near-miss-addressstores a shortened form of her addresscaught by the-address-that-was-asked-for