Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions express-joi-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ module.exports.createValidator = function generateJoiMiddlewareInstance(cfg) {
return resJson(value)
} else if (opts.passError || cfg.passError) {
ret.type = type
// restore res.json to original value
res.json = resJson
next(ret)
} else {
res
Expand Down