feat: improve form results and harden secrets

This commit is contained in:
2026-07-30 14:48:46 +07:00 Unverified
parent 6b0440602b
commit a014f72d0f
32 changed files with 471 additions and 11 deletions
+1
View File
@@ -1,3 +1,4 @@
import "server-only";
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import * as schema from "./schema";
+1
View File
@@ -85,6 +85,7 @@ export const submissions = formSchema.table(
.references(() => forms.id, { onDelete: "cascade" }),
userDiscordId: text("user_discord_id"),
userName: text("user_name"),
adminNote: text("admin_note"),
submittedAt: timestamp("submitted_at", { mode: "date" }).defaultNow().notNull(),
editHistory: jsonb("edit_history")
.$type<{ editedAt: string; oldAnswers: Record<string, { value: string; imageCdnId: string | null }> }[]>()