fix(validation)

This commit is contained in:
Stefan080106
2023-04-17 22:28:54 +02:00
parent 6b72b4e9f9
commit 113d7c5dc1

View File

@@ -168,6 +168,11 @@ app.post('/depesche', async (req, res) => {
}
console.log("[INFO] Received print request");
if (req.body.foreign_id == "") {
req.body.foreign_id = "undefined"
}
let value = {}
try {
value = await schema.validateAsync(req.body, { allowUnknown: true });
@@ -181,6 +186,7 @@ app.post('/depesche', async (req, res) => {
}
await main(value).catch(
(err) => {
console.log(err);