fix(validation)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user