From 2a1b326f9441f5bf7e38e617a196494e84a00ca3 Mon Sep 17 00:00:00 2001 From: dragongoose Date: Tue, 17 Oct 2023 22:00:03 -0400 Subject: [PATCH] fix clip support --- src/router/index.ts | 7 ++++++- src/views/ClipView.vue | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 2d09a96..2306f46 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -46,7 +46,12 @@ const router = createRouter({ component: VodView }, { - path: '/:streamer/clip/:slug', + path: '/clip/:slug', + component: ClipView + }, + // suppotrt other clip method + { + path: '/:streamerName/clip/:slug', component: ClipView }, { path: '/:pathMatch(.*)*', component: PageNotFound } diff --git a/src/views/ClipView.vue b/src/views/ClipView.vue index 9c8596c..b90f048 100644 --- a/src/views/ClipView.vue +++ b/src/views/ClipView.vue @@ -56,7 +56,7 @@ export default { const clipSlug = this.$route.params.slug const streamerName = this.$route.params.streamer - await getEndpoint(`api/clips/${streamerName}/${clipSlug}`) + await getEndpoint(`api/clips/${clipSlug}`) .then((data) => { this.data = data })