From 1c5d533ffda9b2cfaec90a67646eae22e73b1a9b Mon Sep 17 00:00:00 2001 From: bytedream Date: Thu, 29 Oct 2026 20:41:12 +0100 Subject: [PATCH] change user api http method --- README.md | 2 +- src/pages/api/users/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fc5df65..d9db46e 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@
-PUT /api/users (Erstellt einen neuen Spieler) +POST /api/users (Erstellt einen neuen Spieler) ##### Request Body diff --git a/src/pages/api/users/index.ts b/src/pages/api/users/index.ts index 90ba929..733c152 100644 --- a/src/pages/api/users/index.ts +++ b/src/pages/api/users/index.ts @@ -2,7 +2,7 @@ import { z } from 'astro:schema'; import { db } from '@db/database.ts'; import { externalApi } from '../_api.ts'; -export const PUT = externalApi({ +export const POST = externalApi({ auth: true, input: z.object({ firstname: z.string().trim().min(1),