speedruncomorg / api

REST API Documentation for speedrun.com
346 stars 36 forks source link

`POST /runs` ignores superfluous `players` elements #138

Open exodustx0 opened 2 years ago

exodustx0 commented 2 years ago

For example, on a category which requires exactly 1 player for runs, if you supply:

{
    "players": [
        { "rel": "guest", "name": "first test guest" },
        { "rel": "guest", "name": "second test guest" }
    ]
}

...just the first player element is used, and the second element is ignored. Ideally, it should HTTP 400 because of the superfluous players; it makes no sense to consider a run valid if the resulting run is different from the requested one.

I've only been able to test this on a full-game category and a level category, both of which require exactly 1 player for runs, so I can't tell if the same counts for categories which have an "up-to" player count requirement.