Log header validation result in server.js
Added a console.log statement to output the result of header validation in the request handler. Also fixed a minor formatting issue in the cape texture schema file.
This commit is contained in:
parent
adddbadbf3
commit
53e58bdb30
@ -11,4 +11,4 @@ module.exports = {
|
|||||||
DELETE: {
|
DELETE: {
|
||||||
headers: headerSchema
|
headers: headerSchema
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
@ -88,6 +88,7 @@ app.all(/.*/, (req, res, next) => {
|
|||||||
|
|
||||||
if (methodConfig.headers) {
|
if (methodConfig.headers) {
|
||||||
const headerResult = methodConfig.headers.safeParse(req.headers)
|
const headerResult = methodConfig.headers.safeParse(req.headers)
|
||||||
|
console.log(headerResult)
|
||||||
if (!headerResult.success) {
|
if (!headerResult.success) {
|
||||||
throw new ValidationError(headerResult, errorConfig, context)
|
throw new ValidationError(headerResult, errorConfig, context)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user