0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch.git synced 2025-01-03 11:20:07 -05:00

fix clip support

This commit is contained in:
dragongoose 2023-10-17 22:00:03 -04:00
parent 170bfd187c
commit 2a1b326f94
No known key found for this signature in database
GPG key ID: 01397EEC371CDAA5
2 changed files with 7 additions and 2 deletions

View file

@ -46,7 +46,12 @@ const router = createRouter({
component: VodView component: VodView
}, },
{ {
path: '/:streamer/clip/:slug', path: '/clip/:slug',
component: ClipView
},
// suppotrt other clip method
{
path: '/:streamerName/clip/:slug',
component: ClipView component: ClipView
}, },
{ path: '/:pathMatch(.*)*', component: PageNotFound } { path: '/:pathMatch(.*)*', component: PageNotFound }

View file

@ -56,7 +56,7 @@ export default {
const clipSlug = this.$route.params.slug const clipSlug = this.$route.params.slug
const streamerName = this.$route.params.streamer const streamerName = this.$route.params.streamer
await getEndpoint(`api/clips/${streamerName}/${clipSlug}`) await getEndpoint(`api/clips/${clipSlug}`)
.then((data) => { .then((data) => {
this.data = data this.data = data
}) })