mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -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
|
@ -5,7 +5,7 @@ const formidable = require('formidable')
|
|||
|
||||
const config = require('../../config')
|
||||
const logger = require('../../logger')
|
||||
const response = require('../../response')
|
||||
const errors = require('../../errors')
|
||||
|
||||
const imageRouter = module.exports = Router()
|
||||
|
||||
|
@ -22,7 +22,7 @@ imageRouter.post('/uploadimage', function (req, res) {
|
|||
form.parse(req, function (err, fields, files) {
|
||||
if (err || !files.image || !files.image.path) {
|
||||
logger.error(`formidable error: ${err}`)
|
||||
response.errorForbidden(res)
|
||||
errors.errorForbidden(res)
|
||||
} else {
|
||||
logger.debug(`SERVER received uploadimage: ${JSON.stringify(files.image)}`)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue