refactor: Get Thunderstore package API response from backend#168
refactor: Get Thunderstore package API response from backend#168
Conversation
Previously Thunderstore package index was done in frontend. Should be moved to backend instead as backend is reponsible for such tasks while frontend should just be used to store and display information.
| @Alystrasz any idea how to get rid of the undefined warning? Trying to use an if-guard just gives another error :( |
Makes it more descriptive what it does
Replaces the current TypeScript interface defintions with autogenerated bindings.
| CI failing cause Ubuntu Azure repos are down (still) and cause of TypeScript warning mentioned in #168 (comment) that I will need assistance with to solve. |
You need to initialize your let mods: ThunderstoreMod[] = []; await invoke<ThunderstoreMod[]>("query_thunderstore_packages_api") .then((message) => { mods = message; }) .catch((error) => { console.error(error); return; }); if (mods.length === 0) { return; } |
Thanks for the clarification, fixed in 394f561. Empty check isn't needed then anyway cause it's implicitly handled due it being an (empty) array. ^^ |
i32 should be big enough unless Thunderstore and Northstar suddenly becomes really huge and we start seeing over 4 million downloads on some mod
| Assuming CI passes now, this PR should be done and ready for review ^^ |
| Ok, now it should be fixed ^^" |
Alystrasz left a comment
There was a problem hiding this comment.
LGTM.
Confirmed working on Windows.


Previously Thunderstore package index was done in frontend. Should be moved to backend instead as backend is reponsible for such tasks while frontend should just be used to store and display information.
Closes #164
Closes #120 cause filtering no longer happens in frontend but instead in backend.