Fix ordering of games in category page, thanks to @szeraax
[stouyapi.git] / bin / import-game-data.php
index 66724090fe83792a0bbce20ec54df394c7b7cc48..2c7aee6279a384b60760176f5f4b982c2f08e825 100755 (executable)
@@ -80,7 +80,7 @@ foreach ($gameFiles as $gameFile) {
     }
 }
 
-writeJson('api/v1/discover.json', buildDiscover($games));
+writeJson('api/v1/discover-data/discover.json', buildDiscover($games));
 writeJson('api/v1/discover-data/home.json', buildDiscoverHome($games));
 
 
@@ -174,7 +174,7 @@ function buildDiscoverCategory($name, $games)
     usort(
         $games,
         function ($gameA, $gameB) {
-            return strcmp($gameB->title, $gameA->title);
+            return strcmp($gameA->title, $gameB->title);
         }
     );
     $chunks = array_chunk($games, 4);