From: Ant Zucaro Date: Mon, 24 Dec 2018 16:18:26 +0000 (-0500) Subject: Enable JSON for the games view as well. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=017ac3479294fe637ba62bb33779181a0fd1c648;p=xonotic%2Fxonstat.git Enable JSON for the games view as well. --- diff --git a/xonstat/__init__.py b/xonstat/__init__.py index 54b0ffc..8646c02 100644 --- a/xonstat/__init__.py +++ b/xonstat/__init__.py @@ -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")