smallketchup82 / ketchupbot-updater

epic galxy pedia updator
Creative Commons Attribution Share Alike 4.0 International
1 stars 0 forks source link

Bot does not remove info not returned by Galaxy Info API #37

Open CornHusker89 opened 2 months ago

CornHusker89 commented 2 months ago

I get that this behavior is intentional, but this can also cause problems.

An example of this is when permits got removed for limited ships, so the Galaxy Info API stopped returning permit information (bc those ships didn't require permits anymore), however because of this behavior, limited ship infoboxes reported that these ships still required permits, which was false.

I think that we should implement a system where if the api dosen't return anything for an infobox parameter, the bot then checks if the api ever did return a result. If it never did return something, the bot will leave it as it is (for example, the ship creator section of the infobox). If the api did return something in the past, it will remove it from the infobox (ex. limited ship permits).

This is the affected code segment https://github.com/smallketchup82/ketchupbot-updater/blob/f0af630db0788a47e052bf4a69f718722e2c9648/src/index.ts#L367-L374

CornHusker89 commented 2 months ago

as a side note, i still dont have the galaxy api token or endpoint so i cant really test any changes here resolved

smallketchup82 commented 1 month ago

this seems like more of an issue with direction than a bug, so im removing the bug. also this probably still applies to ketchupbot v3 so im keeping it opened.

will begin discussion on this soon