diff --git a/backend/src/routes/tenant.ts b/backend/src/routes/tenant.ts index f2c363dc..15a2d295 100644 --- a/backend/src/routes/tenant.ts +++ b/backend/src/routes/tenant.ts @@ -278,6 +278,11 @@ export default async function tenantRoutes(server: FastifyInstance) { if (!data) return reply.code(400).send({ error: "data required" }) + if (data.businessInfo && Object.prototype.hasOwnProperty.call(data.businessInfo, "outgoingEInvoiceEnabled") + && typeof data.businessInfo.outgoingEInvoiceEnabled !== "boolean") { + return reply.code(400).send({ error: "Die Einstellung für Ausgangs-E-Rechnungen muss ein Wahrheitswert sein." }) + } + if (Object.prototype.hasOwnProperty.call(data, "portalConfig")) { const config = data.portalConfig if (!config || typeof config !== "object" || Array.isArray(config)