Cypress und API
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { VerbrauchsausweisWohnenClient, ZodOverlap } from "#components/Ausweis/types.js";
|
||||
import { exclude } from "#lib/exclude.js";
|
||||
import { authorizationMiddleware } from "#lib/middleware/authorization.js";
|
||||
import { prisma, VerbrauchsausweisWohnenSchema } from "@ibcornelsen/database/server";
|
||||
@@ -59,15 +60,15 @@ export const GET = defineApiRoute({
|
||||
}
|
||||
}
|
||||
},
|
||||
output: VerbrauchsausweisWohnenSchema.merge(z.object({
|
||||
output: ZodOverlap<VerbrauchsausweisWohnenClient>(VerbrauchsausweisWohnenSchema.merge(z.object({
|
||||
uid_aufnahme: z.string().uuid(),
|
||||
uid_objekt: z.string().uuid(),
|
||||
uid_benutzer: z.string().uuid().optional()
|
||||
})).omit({
|
||||
id: true,
|
||||
aufnahme_id: true,
|
||||
benutzer_id: true,
|
||||
}),
|
||||
benutzer_id: true
|
||||
})),
|
||||
middleware: authorizationMiddleware,
|
||||
async fetch(input, context, user) {
|
||||
const { uid } = context.params;
|
||||
|
||||
Reference in New Issue
Block a user