mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-25 07:33:07 +01:00
Updated backend packages
This commit is contained in:
1 parent
a62c2a6dc3
commit
4e2b052b50
27 files changed
+676
-742
No files matched your search
@@ -24,21 +24,17 @@ const apiValidator = async (schema, payload /*, description*/) => {
|
||||
throw new errs.ValidationError("Payload is undefined");
|
||||
}
|
||||
|
||||
|
||||
const validate = ajv.compile(schema);
|
||||
|
||||
const valid = validate(payload);
|
||||
|
||||
|
||||
if (valid && !validate.errors) {
|
||||
return payload;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const message = ajv.errorsText(validate.errors);
|
||||
const err = new errs.ValidationError(message);
|
||||
err.debug = {validationErrors: validate.errors, payload};
|
||||
err.debug = { validationErrors: validate.errors, payload };
|
||||
throw err;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user