Fehler gefixt

This commit is contained in:
Moritz Utcke
2025-03-10 20:11:57 -03:00
parent e69362536e
commit 4979a1d112
23 changed files with 501 additions and 233 deletions

View File

@@ -11,7 +11,10 @@ export const PATCH = defineApiRoute({
uid: true,
id: true,
benutzer_id: true,
aufnahme_id: true
aufnahme_id: true,
rechnung_id: true,
created_at: true,
updated_at: true
}).merge(z.object({
startdatum: z.coerce.date()
})),

View File

@@ -1,7 +1,8 @@
import { UUidWithPrefix } from "#components/Ausweis/types.js";
import { authorizationHeaders, authorizationMiddleware } from "#lib/middleware/authorization.js";
import { prisma, VerbrauchsausweisWohnenSchema } from "#lib/server/prisma";
import { prisma } from "#lib/server/prisma.js";
import { APIError, defineApiRoute } from "astro-typesafe-api/server";
import { VerbrauchsausweisWohnenSchema } from "src/generated/zod/verbrauchsausweiswohnen.js";
import { z } from "zod";
export const PATCH = defineApiRoute({
@@ -22,7 +23,10 @@ export const PUT = defineApiRoute({
id: true,
benutzer_id: true,
uid: true,
aufnahme_id: true
aufnahme_id: true,
rechnung_id: true,
created_at: true,
updated_at: true
}),
uid_aufnahme: UUidWithPrefix
}),
@@ -113,12 +117,7 @@ export const GET = defineApiRoute({
benutzer: true,
aufnahme: {
include: {
objekt: {
include: {
bilder: true,
},
},
rechnungen: true,
bilder: true,
events: {
include: {
benutzer: {