Add support for cap, a pow captcha, and implement on contact form

This commit is contained in:
badblocks 2026-01-06 19:55:56 -08:00
parent 22c2bc1492
commit bdf4f9a051
No known key found for this signature in database
6 changed files with 172 additions and 8 deletions

20
db/config.ts Normal file
View file

@ -0,0 +1,20 @@
import { defineDb, defineTable, column } from "astro:db";
const Cap_Challenges = defineTable({
columns: {
token: column.text({ primaryKey: true }),
data: column.json(),
expires: column.number(),
},
});
const Cap_Tokens = defineTable({
columns: {
key: column.text({ primaryKey: true }),
expires: column.number(),
},
});
export default defineDb({
tables: { Cap_Challenges, Cap_Tokens },
});