feat: migrate send logs and discord links to D1

This commit is contained in:
RhenCloud committed 2026-08-03 05:18:58 +08:00
1 parent 5a98e45544
commit 3a6a2cbbc5
16 files changed
+139 -79

No files matched your search

+1 -1
View File
@@ -77,7 +77,7 @@ Tokens are stored in KV with key pattern `token:{userId}`:
}
```
`expiresAt` is a Unix timestamp in milliseconds. KV entries expire at 90% of the token's lifetime (minimum 60 seconds). A reverse index `token-reverse:{sha256 of token}` maps the access token back to its user id so Bearer-authenticated endpoints can resolve the caller. Discord users linked to a GitHub account are stored under `discord-link:{discordUserId}`.
`expiresAt` is a Unix timestamp in milliseconds. KV entries expire at 90% of the token's lifetime (minimum 60 seconds). A reverse index `token-reverse:{sha256 of token}` maps the access token back to its user id so Bearer-authenticated endpoints can resolve the caller. Discord users linked to a GitHub account are stored in the D1 `discord_links` table.
## Using Tokens