satisfactorymodding / smr-api

Satisfactory Mod Repository (SMR) API
https://ficsit.app
GNU General Public License v3.0
6 stars 8 forks source link

fix: urlencode filename for separate mod targets #47

Closed Th3Fanbus closed 7 months ago

Th3Fanbus commented 7 months ago

When a mod's name contains characters that should be urlencoded, any newly-uploaded versions cannot be download because of some errors regarding the URL being invalid. Make sure the returned key is urlencoded for consistency with the rest of the codebase.

codecov-commenter commented 7 months ago

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 16.94%. Comparing base (867a34d) to head (f323a9f).

Files Patch % Lines
storage/storage.go 0.00% 5 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## staging #47 +/- ## =========================================== - Coverage 16.94% 16.94% -0.01% =========================================== Files 103 103 Lines 5440 5442 +2 =========================================== Hits 922 922 - Misses 4417 4419 +2 Partials 101 101 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mircearoata commented 7 months ago

The linter is failing because of missing whitespace around the +.

Can you also fix the similar issue in RenameVersion that I mentioned in the other PR https://github.com/satisfactorymodding/smr-api/pull/44#issuecomment-1902611988? https://github.com/satisfactorymodding/smr-api/blob/4c5629dc4c3946ac2870a833c46d03908797157d/storage/storage.go#L279

Th3Fanbus commented 7 months ago

The linter is failing because of missing whitespace around the +.

Can you also fix the similar issue in RenameVersion that I mentioned in the other PR #44 (comment)?

https://github.com/satisfactorymodding/smr-api/blob/4c5629dc4c3946ac2870a833c46d03908797157d/storage/storage.go#L279

I think that should be it

EDIT: I ran gofumpt -e -d locally and force-pushed the commits, the CI should be happy now.