Bugfixes
This commit is contained in:
@@ -6,7 +6,7 @@ import { APIError, defineApiRoute } from "astro-typesafe-api/server";
|
||||
export const GET = defineApiRoute({
|
||||
input: z.object({
|
||||
plz: z.string().min(4).max(5),
|
||||
startdatum: z.coerce.date(),
|
||||
startdatum: z.coerce.date().nullable(),
|
||||
enddatum: z.coerce.date(),
|
||||
genauigkeit: z.enum(["months", "years"]),
|
||||
}),
|
||||
|
||||
@@ -16,7 +16,7 @@ export const PATCH = defineApiRoute({
|
||||
updated_at: true,
|
||||
created_at: true
|
||||
}).merge(z.object({
|
||||
startdatum: z.coerce.date()
|
||||
startdatum: z.coerce.date().nullable(),
|
||||
})),
|
||||
output: z.void(),
|
||||
headers: {
|
||||
|
||||
@@ -23,7 +23,7 @@ export const PUT = defineApiRoute({
|
||||
updated_at: true,
|
||||
created_at: true
|
||||
}).merge(z.object({
|
||||
startdatum: z.coerce.date()
|
||||
startdatum: z.coerce.date().nullable()
|
||||
})),
|
||||
aufnahme_id: UUidWithPrefix
|
||||
}),
|
||||
|
||||
@@ -17,7 +17,7 @@ export const PATCH = defineApiRoute({
|
||||
created_at: true,
|
||||
updated_at: true
|
||||
}).merge(z.object({
|
||||
startdatum: z.coerce.date()
|
||||
startdatum: z.coerce.date().nullable()
|
||||
})),
|
||||
output: z.void(),
|
||||
headers: {
|
||||
|
||||
@@ -19,7 +19,7 @@ export const PUT = defineApiRoute({
|
||||
},
|
||||
input: z.object({
|
||||
ausweis: VerbrauchsausweisWohnenSchema.merge(z.object({
|
||||
startdatum: z.coerce.date()
|
||||
startdatum: z.coerce.date().nullable()
|
||||
})).omit({
|
||||
id: true,
|
||||
benutzer_id: true,
|
||||
|
||||
Reference in New Issue
Block a user