genshindev / api

A fan-made Genshin Impact API for easy access to game data.
https://genshin.jmp.blue
Open Software License 3.0
696 stars 188 forks source link

[Bug] Weekly bosses not reachable #142

Closed GBrehier closed 2 months ago

GBrehier commented 2 years ago

As mentionned in title, weekly boss are not reachable. Their data are in assets/data/boss/weekly-boss/XX, so in order to get them i call "/boss/weekly-boss/azhdaha".

The problem come here : because we have "/:param1/:param2/:param3", the router considers it as the route '/:type/:id/:imageType' and try to get the image of the entity "weekly-boss" instead of getting infos of the weekly-boss asked.

Unless the call for weekly-boss is different and doesn't require changes, I've thought of 2 way of corrections :

DrKain commented 2 years ago

You can use the encoded forward slash to access this route. It's not ideal but it will work until a fix is made.

https://api.genshin.dev/boss%2Fweekly-boss/

man90es commented 2 months ago

Thank you for reporting the issue! Fixed in https://github.com/genshindev/api/pull/252