Skip to content

Fix panic when using unlisted filter in /v1/mods#69

Open
dankmeme01 wants to merge 1 commit into
mainfrom
fix-unlisted-panic
Open

Fix panic when using unlisted filter in /v1/mods#69
dankmeme01 wants to merge 1 commit into
mainfrom
fix-unlisted-panic

Conversation

@dankmeme01
Copy link
Copy Markdown
Member

So I'm not sure this is the best way to fix it, but basically the code here tries to get the latest accepted version for each mod, and if a mod has not a single accepted version, get_latest_for_mods simply won't include that ID, which leads to an unchecked unwrap and a panic.

This PR instead just filters out such mods to avoid a panic. I don't think the unlisted filter is actually used anywhere, but it's still a good idea to not expose a panic url to the public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant