lichess-org / api

Lichess API documentation and examples
https://lichess.org/api
GNU Affero General Public License v3.0
442 stars 147 forks source link

Updating rated arena tournament makes it non-rated #193

Closed vgoloviznin closed 2 years ago

vgoloviznin commented 2 years ago

I'm using the endpoint to update existing tournament: https://lichess.org/api#operation/apiTournamentUpdate

This is the data that I'm passing

{
  "berserkable": true,
  "streakable": true,
  "hasChat": true,
  "conditions": {
    "nbRatedGame": {
      "nb": 100
    },
    "teamMember": {
      "teamId": "some-team"
    }
  },
  "clockTime": 3,
  "clockIncrement": 0,
  "rated": true,
  "description": "test",
  "variant": "standard",
  "position": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
  "minutes": 45,
  "name": "some-title"
}

The tournament that I'm modifying is rated, however after sending request to this endpoint and although I'm passing rated:true in the payload, the tournament becomes unrated.

ornicar commented 2 years ago

tournaments from a custom position are unrated. Try removing the position from the payload.

vgoloviznin commented 2 years ago

@ornicar this worked!

Although, as far as I understand the position itself is a standard one.