mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-22 04:31:15 +10:00
feat: annotated client routes
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
import { defineClientEventHandler } from "~/server/internal/clients/event-handler";
|
||||
import prisma from "~/server/internal/db/database";
|
||||
|
||||
/**
|
||||
* Fetch game by ID
|
||||
* @param id Game ID
|
||||
*/
|
||||
export default defineClientEventHandler(async (h3) => {
|
||||
const id = getRouterParam(h3, "id");
|
||||
if (!id)
|
||||
throw createError({ statusCode: 400, statusMessage: "No ID in route" });
|
||||
const id = getRouterParam(h3, "id")!;
|
||||
|
||||
const game = await prisma.game.findUnique({
|
||||
where: {
|
||||
|
||||
Reference in New Issue
Block a user