mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 02:06:29 -05:00
f78540c3fb
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>
24 lines
535 B
JavaScript
24 lines
535 B
JavaScript
'use strict'
|
|
|
|
const Router = require('express').Router
|
|
|
|
const response = require('../response')
|
|
|
|
const baseRouter = module.exports = Router()
|
|
|
|
const errors = require('../errors')
|
|
|
|
// get index
|
|
baseRouter.get('/', response.showIndex)
|
|
// get 403 forbidden
|
|
baseRouter.get('/403', function (req, res) {
|
|
errors.errorForbidden(res)
|
|
})
|
|
// get 404 not found
|
|
baseRouter.get('/404', function (req, res) {
|
|
errors.errorNotFound(res)
|
|
})
|
|
// get 500 internal error
|
|
baseRouter.get('/500', function (req, res) {
|
|
errors.errorInternalError(res)
|
|
})
|