fix: reject non-NA worlds outright

This commit is contained in:
Anna 2022-08-25 18:21:31 -04:00
parent dfced6dcac
commit 017aec72a2
Signed by: anna
GPG Key ID: 0B391D8F06FCD9E0
1 changed files with 4 additions and 0 deletions

View File

@ -406,6 +406,10 @@ fn stats_seven_days(state: Arc<State>) -> BoxedFilter<(impl Reply, )> {
fn contribute(state: Arc<State>) -> BoxedFilter<(impl Reply, )> {
async fn logic(state: Arc<State>, listing: PartyFinderListing) -> std::result::Result<impl Reply, Infallible> {
if listing.created_world >= 10_000 || listing.home_world >= 10_000 || listing.current_world >= 10_000 {
return Ok("invalid listing".to_string());
}
if listing.seconds_remaining > 60 * 60 {
return Ok("invalid listing".to_string());
}