fix: update match configuration to bestOf 5 and scoringType to score_v2

This commit is contained in:
2026-02-28 06:38:05 +01:00
parent e99444b157
commit fb9140a03f
555 changed files with 124715 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
import { error, json } from "@sveltejs/kit";
import { d as db, m as mappool } from "../../../../chunks/index2.js";
const GET = async ({ locals }) => {
if (!locals.user) error(401, "Not logged in");
const mappools = await db.query.mappool.findMany({
orderBy: (m, { desc }) => [desc(m.createdAt)]
});
return json(mappools);
};
const POST = async ({ request, locals }) => {
if (!locals.user) error(401, "Not logged in");
const { name } = await request.json();
if (!name?.trim()) error(400, "Name is required");
const [created] = await db.insert(mappool).values({
name: name.trim(),
createdBy: locals.user.id
}).returning();
return json(created, { status: 201 });
};
export {
GET,
POST
};