diff --git a/src/components/ChannelPage.vue b/src/components/ChannelPage.vue index 75966797..73685671 100644 --- a/src/components/ChannelPage.vue +++ b/src/components/ChannelPage.vue @@ -121,7 +121,9 @@ export default { }); }, async fetchChannel() { - const url = this.apiUrl() + "/" + this.$route.params.path + "/" + this.$route.params.channelId; + const url = this.$route.path.includes("@") + ? this.apiUrl() + "/c/" + this.$route.params.channelId + : this.apiUrl() + "/" + this.$route.params.path + "/" + this.$route.params.channelId; return await this.fetchJson(url); }, async getChannelData() { diff --git a/src/router/router.js b/src/router/router.js index 29bb7c61..440355ed 100644 --- a/src/router/router.js +++ b/src/router/router.js @@ -41,6 +41,11 @@ const routes = [ name: "Channel", component: () => import("../components/ChannelPage.vue"), }, + { + path: "/@:channelId", + name: "Channel handle", + component: () => import("../components/ChannelPage.vue"), + }, { path: "/login", name: "Login",