remove req type checking

This commit is contained in:
srgooglo 2022-05-06 12:12:37 +02:00
parent cdb752dd1b
commit 3190fba4b7

View File

@ -1,11 +1,12 @@
export default (schema = {}, fn) => {
return async (req, res, next) => {
if (typeof req.body === "undefined") {
req.body = {}
}
if (typeof req.query === "undefined") {
req.query = {}
}
// not necessary since linebridge lib will do this for you
// if (typeof req.body === "undefined") {
// req.body = {}
// }
// if (typeof req.query === "undefined") {
// req.query = {}
// }
if (schema.required) {
if (Array.isArray(schema.required)) {