summaryrefslogtreecommitdiff
path: root/lib/web/middleware/checkURIValid.js
diff options
context:
space:
mode:
authorDavid Mehren2019-10-27 13:51:53 +0100
committerDavid Mehren2019-10-27 13:51:53 +0100
commitf78540c3fbf109d6ccf2d92c5b1cf0148c88f722 (patch)
tree7f8b968b925b8b262cca0f4cd180027abc4b745e /lib/web/middleware/checkURIValid.js
parent20a67e3446723231961043bffeb5a7b974e891c0 (diff)
Move note actions to their own file.
Because of circular import problems, this commit also moves the error messages from response.js to errors.js Signed-off-by: David Mehren <dmehren1@gmail.com>
Diffstat (limited to 'lib/web/middleware/checkURIValid.js')
-rw-r--r--lib/web/middleware/checkURIValid.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/web/middleware/checkURIValid.js b/lib/web/middleware/checkURIValid.js
index 88065e79..cd6dabd2 100644
--- a/lib/web/middleware/checkURIValid.js
+++ b/lib/web/middleware/checkURIValid.js
@@ -1,14 +1,14 @@
'use strict'
const logger = require('../../logger')
-const response = require('../../response')
+const errors = require('../../errors')
module.exports = function (req, res, next) {
try {
decodeURIComponent(req.path)
} catch (err) {
logger.error(err)
- return response.errorBadRequest(res)
+ return errors.errorBadRequest(res)
}
next()
}