]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Enable JSON for the games view as well. json-suffix
authorAnt Zucaro <azucaro@gmail.com>
Mon, 24 Dec 2018 16:18:26 +0000 (11:18 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Mon, 24 Dec 2018 16:18:26 +0000 (11:18 -0500)
xonstat/__init__.py

index 54b0ffcbecb4ab2cdaf52c2e78b4d4bab7859369..8646c02aa202645fb838c96262f8093ac1057964 100644 (file)
@@ -141,7 +141,10 @@ def main(global_config, **settings):
     config.add_view(game_info_json, route_name="game_info_json", renderer="jsonp")
 
     config.add_route("game_index", "/games")
-    config.add_view(game_finder, route_name="game_index", renderer="game_finder.mako")
+    config.add_view(game_finder, route_name="game_index", accept="text/html",
+                    renderer="game_finder.mako")
+    config.add_view(game_finder_json, route_name="game_index", accept="application/json",
+                    renderer="json")
 
     config.add_route("game_index_json", "/games.json")
     config.add_view(game_finder_json, route_name="game_index_json", renderer="jsonp")