2020-06-06 00:03:37 +02:00
|
|
|
"use strict";
|
2016-06-14 10:31:48 +02:00
|
|
|
|
2020-06-06 00:03:37 +02:00
|
|
|
const topNavigation = require("../models/top_navigation.js");
|
|
|
|
const NotFoundView = require("../views/not_found_view.js");
|
2016-06-14 10:31:48 +02:00
|
|
|
|
|
|
|
class NotFoundController {
|
|
|
|
constructor(path) {
|
2020-06-06 00:03:37 +02:00
|
|
|
topNavigation.activate("");
|
|
|
|
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
|
|
|
|
2020-06-06 00:03:37 +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-06 00:03:37 +02:00
|
|
|
};
|