• Mahmoud Aglan's avatar
    fix: complete Swiss API integration fixes for bot tournament flow · 102e8b47
    Mahmoud Aglan authored
    1. Content-Type: application/json only sent when body is not null.
       Swiss API rejects bodiless POST/GET with that header.
    2. Controller start() now calls Swiss API /start endpoint.
    3. simulateNextRound() auto-starts Swiss tournament if local status
       is still draft/registration.
    4. generateRound response parsing fixed — data is in {round:{id,...}}.
    5. getPairings response wrapped in {data:[...]} — now handled.
    6. Pairing field names use camelCase (whitePlayerId not white_player_id).
    7. Player ratings fetched from listPlayers instead of expecting them
       embedded in pairing objects.
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    102e8b47
controller.php 45.1 KB