mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
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>
This commit is contained in:
parent
20a67e3446
commit
f78540c3fb
16 changed files with 410 additions and 390 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue