Optimization for AI Chat/ Fixed Themes not loading

This commit is contained in:
JCBSComputer
2026-06-30 15:54:16 +02:00
parent db487e4614
commit 1e4950009d
5 changed files with 213 additions and 98 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ export async function GET() {
[user.id],
)
const websiteTheme = result.rows[0]?.website_theme || "spidey"
const websiteTheme = result.rows[0]?.website_theme || "default"
return NextResponse.json({ websiteTheme })
} catch (error) {
console.error("Website theme GET error:", error)
@@ -26,7 +26,7 @@ export async function PUT(request: NextRequest) {
if (!user) return NextResponse.json({ error: "Unauthorized" }, { status: 401 })
const body = await request.json()
const theme = body.websiteTheme || "spidey"
const theme = body.websiteTheme || "default"
await query(
`UPDATE users SET preferences = preferences || $2::jsonb WHERE id = $1`,