diff --git a/frontend/static/js/index.js b/frontend/static/js/index.js index 47255df..d5bef31 100644 --- a/frontend/static/js/index.js +++ b/frontend/static/js/index.js @@ -3,6 +3,7 @@ import Dashboard from "./views/Dashboard.js"; import Posts from "./views/Posts.js"; import PostView from "./views/PostView.js"; import Settings from "./views/Settings.js"; +import Search from "./views/Search.js"; import Chat from "./views/Chat.js"; import HomeView from "./views/HomeView.js"; import RegisterView from "./views/accounts/RegisterView.js"; @@ -40,6 +41,7 @@ const router = async (uri = "") => { { path: "/login", view: LoginView }, { path: "/logout", view: LogoutView }, { path: "/register", view: RegisterView }, + { path: "/search", view: Search }, { path: "/chat", view: Chat }, { path: "/home", view: HomeView }, ]; @@ -94,4 +96,4 @@ document.addEventListener("DOMContentLoaded", () => { router(location.pathname); }); -export { client, navigateTo } \ No newline at end of file +export { client, navigateTo } diff --git a/frontend/static/js/views/Chat.js b/frontend/static/js/views/Chat.js index de4b02b..472be28 100644 --- a/frontend/static/js/views/Chat.js +++ b/frontend/static/js/views/Chat.js @@ -4,7 +4,7 @@ export default class extends AbstractAuthentifiedView { constructor(params) { super(params, "Chat"); - let url = `wss://${window.location.host}/ws/socket-server/` + let url = `ws://${window.location.host}/ws/socket-server/` this.chatSocket = new WebSocket(url) this.chatSocket.onmessage = function(e){ @@ -44,7 +44,7 @@ export default class extends AbstractAuthentifiedView {