fix(log): migrate db.execute usage to match latest drizzle
This commit is contained in:
@@ -4,7 +4,7 @@ import { auditLog, user } from "@/lib/db/schema";
|
||||
import AuditLogViewer from "./client";
|
||||
|
||||
export default async function AuditLogViewerPage() {
|
||||
const { rows: logs } = (await db.execute(sql`
|
||||
const logs = (await db.execute(sql`
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT *
|
||||
@@ -13,7 +13,7 @@ export default async function AuditLogViewerPage() {
|
||||
LIMIT 1000
|
||||
) t
|
||||
ORDER BY id ASC;
|
||||
`)) as unknown as { rows: (typeof auditLog.$inferSelect)[] };
|
||||
`)) as (typeof auditLog.$inferSelect)[];
|
||||
const users = await db
|
||||
.select({ name: user.name, email: user.email })
|
||||
.from(user);
|
||||
|
||||
Reference in New Issue
Block a user