Skip to content

Commit

Permalink
dashboard improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
NebraskyTheWolf committed Jan 27, 2024
1 parent 66e663f commit 8083d79
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/api/website/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,18 @@ export default class WebsiteServer {
this.routes.add(new Auth())

app.use(function (req, res, next) {
res.status(404)
res.render('dashboard/views/errors/404')
if (req.statusCode === 404) {
return res.render('dashboard/views/errors/404')
} else if (req.statusCode === 403) {
return res.render('dashboard/views/errors/403')
} else {
next()
}
})

app.use(function (req, res, next) {
res.status(403)
res.render('dashboard/views/errors/403')
res.render('./dashboard/views/errors/403')
})

Riniya.instance.logger.info('The website is operational.')
Expand Down

0 comments on commit 8083d79

Please sign in to comment.