api icon indicating copy to clipboard operation
api copied to clipboard

[Bug] Weekly bosses not reachable

Open GBrehier opened this issue 2 years ago • 1 comments

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 :

  • Create a new route which its path begins by "/boss/..." but we are no longer full generic in routes because we add "boss"
  • Move the folder weekly-boss at the same level as the others and keep boss for only non-weekly boss (but for some persons it can be less logic as weekly-boss is a type of boss)

GBrehier avatar Mar 12 '22 19:03 GBrehier

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/

DrKain avatar Apr 09 '22 03:04 DrKain