fix(settings): validate e-invoice toggle value
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user