0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch.git synced 2024-12-22 05:12:57 -05:00

URL encode categories #41

This commit is contained in:
dragongoose 2023-09-16 11:24:50 -04:00
parent 34f9320889
commit 034958a8b7
No known key found for this signature in database
GPG key ID: 01397EEC371CDAA5
2 changed files with 2 additions and 2 deletions

View file

@ -25,7 +25,7 @@ export default {
<template>
<div class="bg-ctp-crust w-40 lg:w-[11rem] md:w-[13.5rem] rounded-lg">
<router-link :to="`/directory/game/${category.name}`">
<router-link :to="`/directory/game/${encodeURIComponent(category.name)}`">
<img :src="category.image" class="rounded-lg rounded-b-none w-full" />
</router-link>

View file

@ -20,7 +20,7 @@ export default {
}
},
async mounted() {
await getEndpoint('api/discover/' + this.$route.params.game)
await getEndpoint('api/discover/' + encodeURIComponent(this.$route.params.game))
.catch(() => {
this.status = 'error'
})