add: 404 not found
This commit is contained in:
parent
072c97d1c0
commit
c303042588
@ -8,6 +8,7 @@ import RegisterView from "./views/accounts/RegisterView.js";
|
|||||||
import LogoutView from "./views/accounts/LogoutView.js";
|
import LogoutView from "./views/accounts/LogoutView.js";
|
||||||
import GameView from "./views/Game.js"
|
import GameView from "./views/Game.js"
|
||||||
|
|
||||||
|
import PageNotFoundView from './views/PageNotFoundView.js'
|
||||||
|
|
||||||
import AbstractRedirectView from "./views/AbstractRedirectView.js";
|
import AbstractRedirectView from "./views/AbstractRedirectView.js";
|
||||||
import MeView from "./views/MeView.js";
|
import MeView from "./views/MeView.js";
|
||||||
@ -62,7 +63,10 @@ const router = async (uri) => {
|
|||||||
|
|
||||||
if (!match) {
|
if (!match) {
|
||||||
match = {
|
match = {
|
||||||
route: routes[0],
|
route: {
|
||||||
|
path: uri,
|
||||||
|
view: PageNotFoundView
|
||||||
|
},
|
||||||
result: [uri]
|
result: [uri]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
14
frontend/static/js/views/PageNotFoundView.js
Normal file
14
frontend/static/js/views/PageNotFoundView.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import AbstractView from "./AbstractView.js";
|
||||||
|
|
||||||
|
export default class extends AbstractView {
|
||||||
|
constructor(params) {
|
||||||
|
super(params, "Dashboard");
|
||||||
|
}
|
||||||
|
|
||||||
|
async getHtml() {
|
||||||
|
return `
|
||||||
|
<h1>404 Bozo</h1>
|
||||||
|
<p>Git gud</p>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user