tierlist done(without sortables)

This commit is contained in:
Dreamgineer
2025-10-09 04:02:22 -04:00 Unverified
parent 4a58cdfb4e
commit ba6143f63b
17 changed files with 547 additions and 90 deletions
+9
View File
@@ -0,0 +1,9 @@
import { sse } from "@/lib/utils";
export async function GET(
_req: Request,
{ params }: { params: Promise<{ ver: string }> },
) {
const { ver } = await params;
return sse.new(`tl-${ver}`);
}
+16
View File
@@ -0,0 +1,16 @@
import { eq } from "drizzle-orm";
import { NextResponse } from "next/server";
import { db } from "@/lib/db";
import { tierlistStates } from "@/lib/db/schema";
export async function GET(
_req: Request,
{ params }: { params: Promise<{ ver: string }> },
) {
const { ver } = await params;
const states = await db
.select()
.from(tierlistStates)
.where(eq(tierlistStates.list, ver));
return NextResponse.json(states);
}