EDSM-NET / FrontEnd

Issues tracker for EDSM
https://www.edsm.net/
37 stars 0 forks source link

cube-systems filters systems without primaryStar #482

Open HansAcker opened 2 years ago

HansAcker commented 2 years ago

With the parameter "showPrimaryStar=1", the cube-systems API omits systems completely if there is no primaryStar:

https://www.edsm.net/api-v1/cube-systems?x=-967.21875&y=-155.25&z=498.5625&size=2&showPrimaryStar=1

{}

https://www.edsm.net/api-v1/cube-systems?x=-967.21875&y=-155.25&z=498.5625&size=2&showPrimaryStar=0

[{"distance":0,"bodyCount":null,"name":"Dumbbell Sector KM-W c1-7"}]

The sphere-systems endpoint returns the system with an empty "primaryStar" instead, which is the expected result:

https://www.edsm.net/api-v1/sphere-systems?x=-967.21875&y=-155.25&z=498.5625&radius=1&showPrimaryStar=1

[{"distance":0,"bodyCount":null,"name":"Dumbbell Sector KM-W c1-7","primaryStar":{}}]

(the documentation says that a NULL would be returned, but {} actually suits me better)