Compare commits
4
Commits
main
...
dmgnr/vercel
@@ -4,7 +4,8 @@ import { auditLog, user } from "@/lib/db/schema";
|
|||||||
import AuditLogViewer from "./client";
|
import AuditLogViewer from "./client";
|
||||||
|
|
||||||
export default async function AuditLogViewerPage() {
|
export default async function AuditLogViewerPage() {
|
||||||
const logs = (await db.execute(sql`
|
const logs = (
|
||||||
|
await db.execute(sql`
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM (
|
FROM (
|
||||||
SELECT *
|
SELECT *
|
||||||
@@ -13,7 +14,8 @@ export default async function AuditLogViewerPage() {
|
|||||||
LIMIT 1000
|
LIMIT 1000
|
||||||
) t
|
) t
|
||||||
ORDER BY id ASC;
|
ORDER BY id ASC;
|
||||||
`)) as (typeof auditLog.$inferSelect)[];
|
`)
|
||||||
|
).rows as (typeof auditLog.$inferSelect)[];
|
||||||
const users = await db
|
const users = await db
|
||||||
.select({ name: user.name, email: user.email })
|
.select({ name: user.name, email: user.email })
|
||||||
.from(user);
|
.from(user);
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ export default async function AdminLayout({
|
|||||||
}) {
|
}) {
|
||||||
if (!(await adminCheck()))
|
if (!(await adminCheck()))
|
||||||
redirect(`/login?next=${encodeURIComponent("/artifact/admin")}`);
|
redirect(`/login?next=${encodeURIComponent("/artifact/admin")}`);
|
||||||
const subs = (await db.execute(sql`
|
const subs = (
|
||||||
|
await db.execute(sql`
|
||||||
WITH max_checked AS (
|
WITH max_checked AS (
|
||||||
SELECT MAX(queue) AS max_queue
|
SELECT MAX(queue) AS max_queue
|
||||||
FROM artifact.submissions
|
FROM artifact.submissions
|
||||||
@@ -62,7 +63,8 @@ export default async function AdminLayout({
|
|||||||
|
|
||||||
ELSE s.queue
|
ELSE s.queue
|
||||||
END,
|
END,
|
||||||
s.id;`)) as (typeof submissions.$inferSelect)[];
|
s.id;`)
|
||||||
|
).rows as (typeof submissions.$inferSelect)[];
|
||||||
const config = await getArtifactConfig();
|
const config = await getArtifactConfig();
|
||||||
const count = await db
|
const count = await db
|
||||||
.select({ a: sql`NULL` })
|
.select({ a: sql`NULL` })
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"@headless-tree/core": "^1.6.0",
|
"@headless-tree/core": "^1.6.0",
|
||||||
"@headless-tree/react": "^1.6.0",
|
"@headless-tree/react": "^1.6.0",
|
||||||
"@hookform/resolvers": "^5.2.2",
|
"@hookform/resolvers": "^5.2.2",
|
||||||
|
"@neondatabase/serverless": "^1.1.0",
|
||||||
"@next/bundle-analyzer": "16.2.6",
|
"@next/bundle-analyzer": "16.2.6",
|
||||||
"@origin-space/image-cropper": "^0.1.9",
|
"@origin-space/image-cropper": "^0.1.9",
|
||||||
"@radix-ui/react-accordion": "^1.2.12",
|
"@radix-ui/react-accordion": "^1.2.12",
|
||||||
@@ -384,6 +385,8 @@
|
|||||||
|
|
||||||
"@mrleebo/prisma-ast": ["@mrleebo/[email protected]", "", { "dependencies": { "chevrotain": "^10.5.0", "lilconfig": "^2.1.0" } }, "sha512-VxS+okLpNp6YUDLz3rAXv6sE8G4W5cX039bumkPub65xRr9BFxjHaT5ebX4DsiixIGaBwitjWTvx3mAbyI2EUQ=="],
|
"@mrleebo/prisma-ast": ["@mrleebo/[email protected]", "", { "dependencies": { "chevrotain": "^10.5.0", "lilconfig": "^2.1.0" } }, "sha512-VxS+okLpNp6YUDLz3rAXv6sE8G4W5cX039bumkPub65xRr9BFxjHaT5ebX4DsiixIGaBwitjWTvx3mAbyI2EUQ=="],
|
||||||
|
|
||||||
|
"@neondatabase/serverless": ["@neondatabase/[email protected]", "", {}, "sha512-r3ZZhRjEcfEdKIZnoB1RusNgvHuaBRqfCzV4Gi+5A9yUX0S4HTws/ASWqt13wL4y4I+0rqsWGdA2w7EQXHi3+Q=="],
|
||||||
|
|
||||||
"@next/bundle-analyzer": ["@next/[email protected]", "", { "dependencies": { "webpack-bundle-analyzer": "4.10.1" } }, "sha512-amPkVtHCTJAdBwyhhl5+qztHk24O4JlASgrWqh15AmnYi74apfZR46NGC0u4pM6BMAU1mYld4WdzD3cRBP3dOA=="],
|
"@next/bundle-analyzer": ["@next/[email protected]", "", { "dependencies": { "webpack-bundle-analyzer": "4.10.1" } }, "sha512-amPkVtHCTJAdBwyhhl5+qztHk24O4JlASgrWqh15AmnYi74apfZR46NGC0u4pM6BMAU1mYld4WdzD3cRBP3dOA=="],
|
||||||
|
|
||||||
"@next/env": ["@next/[email protected]", "", {}, "sha512-gd8HoHN4ufj73WmR3JmVolrpJR47ILK6LouP5xElPglaVxir6e1a7VzvTvDWkOoPXT9rkkTzyCxBu4yeZfZwcw=="],
|
"@next/env": ["@next/[email protected]", "", {}, "sha512-gd8HoHN4ufj73WmR3JmVolrpJR47ILK6LouP5xElPglaVxir6e1a7VzvTvDWkOoPXT9rkkTzyCxBu4yeZfZwcw=="],
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { drizzle } from "drizzle-orm/bun-sql";
|
import { drizzle } from "drizzle-orm/neon-http";
|
||||||
import * as schema from "./schema";
|
import * as schema from "./schema";
|
||||||
import { withReplicas } from "drizzle-orm/pg-core";
|
import { withReplicas } from "drizzle-orm/pg-core";
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
"@headless-tree/core": "^1.6.0",
|
"@headless-tree/core": "^1.6.0",
|
||||||
"@headless-tree/react": "^1.6.0",
|
"@headless-tree/react": "^1.6.0",
|
||||||
"@hookform/resolvers": "^5.2.2",
|
"@hookform/resolvers": "^5.2.2",
|
||||||
|
"@neondatabase/serverless": "^1.1.0",
|
||||||
"@next/bundle-analyzer": "16.2.6",
|
"@next/bundle-analyzer": "16.2.6",
|
||||||
"@origin-space/image-cropper": "^0.1.9",
|
"@origin-space/image-cropper": "^0.1.9",
|
||||||
"@radix-ui/react-accordion": "^1.2.12",
|
"@radix-ui/react-accordion": "^1.2.12",
|
||||||
|
|||||||
Reference in New Issue
Block a user