-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 ^^" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.