From e1d76ededfe0d9c44101489daacdc6497ff3b093 Mon Sep 17 00:00:00 2001 From: Harish V Date: Wed, 31 Jul 2024 22:59:54 +0800 Subject: [PATCH] fix types for db --- apps/studio/src/server/modules/page/page.router.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/studio/src/server/modules/page/page.router.ts b/apps/studio/src/server/modules/page/page.router.ts index 175000e1db..fc99c408a4 100644 --- a/apps/studio/src/server/modules/page/page.router.ts +++ b/apps/studio/src/server/modules/page/page.router.ts @@ -92,7 +92,9 @@ export const pageRouter = router({ readPage: protectedProcedure .input(getPageSchema) .query(async ({ input: { pageId, siteId } }) => { - return getPageById(db, { resourceId: pageId, siteId }) + return db.transaction().execute(async (tx) => { + return getPageById(tx, { resourceId: pageId, siteId }) + }) }), readPageAndBlob: protectedProcedure