Fix build: simplify consent API to static-compatible console logging

- Remove [sessionId].ts dynamic route (requires adapter in static mode)
- Simplify consent API to log to console only (no SQLite/better-sqlite3)
- Fix syntax error in consent-logs page (curly brace escaping)
- Consent logs page works for viewing instructions (password: Coolm@n1234mo)

Note: In static mode, API routes cannot actually handle POST requests.
For full runtime consent logging, would need hybrid/SSR deployment.
This commit is contained in:
Kunthawat
2026-04-01 15:23:54 +07:00
parent 41bf954d80
commit a1c9930d49
4 changed files with 43 additions and 339 deletions

View File

@@ -1,7 +1,6 @@
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',
@@ -11,9 +10,7 @@ export default defineConfig({
}),
sitemap(),
],
adapter: node({
mode: 'standalone',
}),
output: 'static',
i18n: {
defaultLocale: 'th',
locales: ['th'],