2017-04-11 17:38:54 -04:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const Router = require('express').Router
|
|
|
|
|
|
|
|
const response = require('../response')
|
|
|
|
|
|
|
|
const baseRouter = module.exports = Router()
|
|
|
|
|
2019-10-27 08:51:53 -04:00
|
|
|
const errors = require('../errors')
|
|
|
|
|
2017-04-11 17:38:54 -04:00
|
|
|
// get index
|
|
|
|
baseRouter.get('/', response.showIndex)
|
|
|
|
// get 403 forbidden
|
|
|
|
baseRouter.get('/403', function (req, res) {
|
2019-10-27 08:51:53 -04:00
|
|
|
errors.errorForbidden(res)
|
2017-04-11 17:38:54 -04:00
|
|
|
})
|
|
|
|
// get 404 not found
|
|
|
|
baseRouter.get('/404', function (req, res) {
|
2019-10-27 08:51:53 -04:00
|
|
|
errors.errorNotFound(res)
|
2017-04-11 17:38:54 -04:00
|
|
|
})
|
|
|
|
// get 500 internal error
|
|
|
|
baseRouter.get('/500', function (req, res) {
|
2019-10-27 08:51:53 -04:00
|
|
|
errors.errorInternalError(res)
|
2017-04-11 17:38:54 -04:00
|
|
|
})
|