refactor(db): migrate app pages and APIs from Prisma facade to Drizzle
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
53b350057d
commit
7c39aef5d9
40 files changed
+1124
-692
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { asc } from "drizzle-orm";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { ContentCard, EmptyState } from "@/components/public/ui";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
import { db, WebsiteBadges } from "@/lib/db";
|
||||
|
||||
export const revalidate = 300;
|
||||
|
||||
@@ -12,10 +13,10 @@ const BADGE_IMG_BASE = "https://images.habbo.com/c_images/album1584";
|
||||
export default async function BadgesPage() {
|
||||
const t = await getTranslations("pages.badges");
|
||||
|
||||
const badges = await prisma.websiteBadges
|
||||
.findMany({
|
||||
orderBy: { badgeName: "asc" },
|
||||
})
|
||||
const badges = await db
|
||||
.select()
|
||||
.from(WebsiteBadges)
|
||||
.orderBy(asc(WebsiteBadges.badgeName))
|
||||
.catch(() => []);
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user