Turns a digest off from the link in its email, without signing in. Mail
clients post here for a one-click unsubscribe (RFC 8058), and so does the
client's /unsubscribe page.
POST /api/unsubscribe?token=— public, with a digest's unsubscribe token. Turns that digest off and answers its cadence.POST /api/users/unsubscribe?token=— the same, at its v3 path, which theList-Unsubscribeheader of every digest sent before v4 names. Those tokens never expire, so this path stays for good.
v
default: Router
Mounted by api/main.ts behind the error, Open Graph and CORS middleware.
An APIException thrown by a handler becomes the JSON error response there.
Usage
import * as mod from "api/routes/unsubscribe.ts";