Sfoglia il codice sorgente

Ajout champ games vide si pas de games dans game/list

Arthur Brandao 6 anni fa
parent
commit
31df5a64c8
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      Serveur/handler.c

+ 1 - 0
Serveur/handler.c

@@ -151,6 +151,7 @@ int handler_game_list(int cliId, JsonParser* json) {
     add_string(&reponse, "message", "ok");
     if (nb == 0) {
         add_integer(&reponse, "numberGameList", 0);
+        add_value(&reponse, ", \"games\": []");
     } else {
         add_integer(&reponse, "numberGameList", nb);
         add_array(&reponse, "games", &game);