Add Server Data management

This commit is contained in:
2025-04-03 20:10:41 +02:00
parent 0552bccb02
commit b12db15bbe
7 changed files with 915 additions and 70 deletions

View File

@@ -1,15 +0,0 @@
import { z } from 'zod';
const pathSchema = z.object({
hello: z.string()
});
const bodySchema = z.object({
world: z.string()
});
export default defineEventHandler(async (event) => {
const pathParams = await getValidatedRouterParams(event, pathSchema.parse);
const body = await readValidatedBody(event, bodySchema.parse);
return { risultato: `${pathParams.hello}-${body.world}` };
});