Implement full consent logging system with SQLite database

- Install better-sqlite3 and @astrojs/node adapter
- Update consent API to use SQLite database
- Add DELETE endpoint for consent logs
- Update admin consent-logs page with full UI (stats, table, export, delete)
- Add sessionId to consent tracking
- Admin password: Coolm@n1234mo

Note: Database stored at data/consent.db (gitignored)
This commit is contained in:
Kunthawat
2026-04-01 15:09:16 +07:00
parent 8cce63bba3
commit 41bf954d80
7 changed files with 996 additions and 71 deletions

View File

@@ -1,6 +1,7 @@
import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import sitemap from '@astrojs/sitemap';
import node from '@astrojs/node';
export default defineConfig({
site: 'https://dealplustech.co.th',
@@ -10,6 +11,9 @@ export default defineConfig({
}),
sitemap(),
],
adapter: node({
mode: 'standalone',
}),
i18n: {
defaultLocale: 'th',
locales: ['th'],