OpenAPI Generierung verbessert

This commit is contained in:
Moritz Utcke
2025-01-24 14:04:58 +07:00
parent bd60df1ef4
commit 6f3ddedd96
15 changed files with 1595 additions and 26 deletions

View File

@@ -1,3 +1,4 @@
import { UUidWithPrefix } from "#components/Ausweis/types.js";
import { hashPassword } from "#lib/password.js";
import { prisma } from "@ibcornelsen/database/server";
import { APIError, defineApiRoute } from "astro-typesafe-api/server";
@@ -11,7 +12,7 @@ export const PUT = defineApiRoute({
name: z.string()
}),
output: z.object({
uid: z.string().uuid()
uid: UUidWithPrefix
}),
async fetch(input) {
const user = await prisma.benutzer.findUnique({