2016-06-14 10:31:48 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const topNavigation = require('../models/top_navigation.js');
|
|
|
|
const NotFoundView = require('../views/not_found_view.js');
|
|
|
|
|
|
|
|
class NotFoundController {
|
|
|
|
constructor(path) {
|
|
|
|
topNavigation.activate('');
|
2016-07-13 21:50:07 +02:00
|
|
|
topNavigation.setTitle('Not found');
|
2016-06-14 10:31:48 +02:00
|
|
|
this._notFoundView = new NotFoundView(path);
|
|
|
|
}
|
2020-06-04 20:09:35 +02:00
|
|
|
}
|
2016-06-14 10:31:48 +02:00
|
|
|
|
|
|
|
module.exports = router => {
|
2017-01-20 21:51:04 +01:00
|
|
|
router.enter(null, (ctx, next) => {
|
2016-06-14 10:31:48 +02:00
|
|
|
ctx.controller = new NotFoundController(ctx.canonicalPath);
|
|
|
|
});
|
2020-06-04 20:09:35 +02:00
|
|
|
}
|