fix: connexion

This commit is contained in:
2023-11-29 16:05:49 +01:00
parent b5b54a98ba
commit 6dc0293455
9 changed files with 88 additions and 27 deletions

View File

@ -4,14 +4,18 @@ import { client, navigateTo } from "../index.js";
export default class extends AbstractView {
constructor(params) {
super(params);
if (client.isAuthentificate() == false)
navigateTo("/home");
this.setTitle("register");
this.setTitle("Home");
}
async getHtml() {
if (await client.isAuthentificate() === false)
{
navigateTo("/login");
return;
}
return `
<h1>HOME</h1>
<a href="/logout" class="nav__link" data-link>Logout</a>
`;
}
}