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

@ -6,6 +6,7 @@ import Settings from "./views/Settings.js";
import Chat from "./views/Chat.js";
import HomeView from "./views/HomeView.js";
import RegisterView from "./views/accounts/RegisterView.js";
import LogoutView from "./views/accounts/LogoutView.js";
import { Client } from "./api/client.js";
@ -34,6 +35,7 @@ const router = async () => {
{ path: "/posts/:id", view: PostView },
{ path: "/settings", view: Settings },
{ path: "/login", view: LoginView },
{ path: "/logout", view: LogoutView },
{ path: "/register", view: RegisterView },
{ path: "/chat", view: Chat },
{ path: "/home", view: HomeView },
@ -55,7 +57,6 @@ const router = async () => {
result: [location.pathname]
};
}
const view = new match.route.view(getParams(match));
document.querySelector("#app").innerHTML = await view.getHtml();