Skip to content

Commit 800c7cd

Browse files
committed
fix: add support for pglite
1 parent 7312fa7 commit 800c7cd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/features/database.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,9 @@ declare module '#hub/drizzle-orm' {
197197
export function hubDrizzle(options) {
198198
return drizzle(async (sql, params, method) => {
199199
try {
200-
const rows = await $fetch<any[]>('/api/_hub/database/query', { method: 'POST', body: { sql, params, method } })
200+
const rows = await $fetch('/api/_hub/database/query', { method: 'POST', body: { sql, params, method } })
201201
return { rows }
202-
} catch (e: any) {
203-
console.error(e.response)
202+
} catch (e) {
204203
return { rows: [] }
205204
}
206205
}, {
@@ -225,7 +224,6 @@ export function hubDrizzle(options) {
225224
getContents: () => drizzleOrmTypes,
226225
}, { nitro: true })
227226
addServerImportsDir(resolve('runtime/database/server/drizzle-utils'))
228-
console.log(nuxt.options.nitro.alias)
229227
}
230228
}
231229

0 commit comments

Comments
 (0)