1 parent 2bb9b70 commit 87a9343Copy full SHA for 87a9343
1 file changed
src/runtime/validator.ts
@@ -188,9 +188,7 @@ async function validateBody(
188
logger: CustomLogger
189
): Promise<unknown> {
190
const body = req.body
191
- const contentType = (req.headers['content-type'] ?? 'application/json').split(
192
- ';'
193
- )[0]
+ const contentType = (req.headers['content-type'] ?? 'application/json').split(';')[0]
194
195
const expectedSchema = rule.content[contentType]?.schema
196
if (typeof expectedSchema === 'undefined') {
@@ -199,7 +197,7 @@ async function validateBody(
199
197
}
200
198
201
if (req.readableEnded === false) {
202
- logger.debug(`! Warning: Body has not be parsed, body validation skipped !`)
+ logger.debug(`Body has not be parsed, body validation skipped!`)
203
return body
204
205
0 commit comments