Skip to content

Commit b3edb76

Browse files
committed
Add API support for filtering reuploads
1 parent f62f264 commit b3edb76

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Refresh.Database/Query/LevelFilterSettings.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,5 +188,15 @@ public LevelFilterSettings(RequestContext context, TokenGame game) : this(game)
188188

189189
this.ShowModdedLevels = showModdedLevels;
190190
}
191+
192+
string? reuploadedFilter = context.QueryString.Get("includeReuploaded");
193+
194+
if (reuploadedFilter != null)
195+
{
196+
if (!bool.TryParse(moddedFilter, out bool showReuploadedLevels))
197+
throw new FormatException("Could not parse reuploaded filter setting because the boolean was invalid.");
198+
199+
this.ShowModdedLevels = showReuploadedLevels;
200+
}
191201
}
192202
}

0 commit comments

Comments
 (0)