refactor(db): migrate app pages and APIs from Prisma facade to Drizzle (6)
CI / check (push) Successful in 24s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m2s

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-08-01 14:15:43 +02:00
1 parent 30b54e99e7
commit ca72966a37
1 file changed
+5 -6
+5 -6
View File
@@ -1,4 +1,4 @@
import { prisma } from "@/lib/prisma";
import { db, WebsiteSetting } from "@/lib/db";
import { siteSettings } from "@/lib/services/site-settings";
import {
PRESETS,
@@ -86,11 +86,10 @@ export async function snapshotCurrentTheme(): Promise<Record<string, string>> {
async function persist(themes: CustomTheme[]): Promise<void> {
const value = JSON.stringify(themes);
await prisma.websiteSetting.upsert({
where: { key: STORE_KEY },
create: { key: STORE_KEY, value, comment: "Theme (housekeeping)" },
update: { value },
});
await db
.insert(WebsiteSetting)
.values({ key: STORE_KEY, value, comment: "Theme (housekeeping)" })
.onDuplicateKeyUpdate({ set: { value } });
siteSettings.reload();
}