unitedworldwrestling / arena-public

14 stars 5 forks source link

Session, Maths aren't created when I am creating Sport Event using API #178

Closed antohasv closed 6 days ago

antohasv commented 6 days ago

Which application you are experiencing a problem with Arena

Describe the bug Session, Maths aren't created when I am creating Sport Event using API. Sessiosn and Maths are created when I am creating Sport event in Arena interface.

To Reproduce Steps to reproduce the behavior: Request Method:POST Request URL:https://arena.sportrec.online/api/json/sport-event/ Authorization:Bearer content-type:application/json

{"country":"CH","timezone":"Europe/Volgograd","name":"QAB","startDate":"2024-06-10T23:28:00.000+03:00","endDate":"2024-06-19T23:28:00.000+03:00","rankingType":"individual","tournamentType":"singlebracket","sessionType":"1day","eventType":"continental-championships","continent":"world","countdown":1,"copyScoresheet":2,"matAssignment":1,"restTime":20,"nbSeeds":8,"secure":0,"addressLocality":"Test"}

Expected behavior Sessios and Maths are created when I am creating Sport event

Screenshots https://www.loom.com/share/67125c38d2c94fb6be349426ad151079

csabavirag commented 6 days ago

That's because the number of mats is missing from your request payload. Just add "nbMats": 3, to the JSON payload and you will get them created accordingly.

antohasv commented 6 days ago

thanks