Add workaround for 503 error in the mod portal api

This commit is contained in:
knoxfighter 2021-01-17 22:08:18 +01:00 committed by GitHub
parent 0bd4572b31
commit 2700ee4520
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,8 @@ type ModPortalStruct struct {
// get all mods uploaded to the factorio modPortal
func ModPortalList() (interface{}, error, int) {
req, err := http.NewRequest(http.MethodGet, "https://mods.factorio.com/api/mods?page_size=max", nil)
// FIXME revert to `page_size=max` when the api got fixed: https://forums.factorio.com/viewtopic.php?f=189&t=94119&p=531316
req, err := http.NewRequest(http.MethodGet, "https://mods.factorio.com/api/mods?page_size=999999", nil)
if err != nil {
return "error", err, http.StatusInternalServerError
}