mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
remove req type checking
This commit is contained in:
parent
cdb752dd1b
commit
3190fba4b7
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user