Skip to content

Commit

Permalink
fix skin url
Browse files Browse the repository at this point in the history
  • Loading branch information
TsFreddie committed Jan 12, 2025
1 parent 9588eab commit d3b2880
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/server/fetches/skins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ export const skins = new FetchCache<SkinInfo>(
result.skins.map(async (skin) => {
skin.url = (
skin.type == 'normal'
? await convert(`https://ddnet.org/skins/skin/${skin.name}.${skin.imgtype}`)
? await convert(
`https://ddnet.org/skins/skin/${encodeURIComponent(skin.name)}.${skin.imgtype}`
)
: await convert(
`https://ddnet.org/skins/skin/${skin.type}/${skin.name}.${skin.imgtype}`
`https://ddnet.org/skins/skin/${encodeURIComponent(skin.type)}/${encodeURIComponent(skin.name)}.${skin.imgtype}`
)
).toString();
map[skin.name] = skin.url;
Expand Down

0 comments on commit d3b2880

Please sign in to comment.