]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Add back the /player/me view.
authorAnt Zucaro <azucaro@gmail.com>
Sun, 25 Aug 2013 21:00:01 +0000 (17:00 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sun, 25 Aug 2013 21:00:01 +0000 (17:00 -0400)
xonstat/__init__.py
xonstat/views/player.py

index b60c35bced012e5b58156c0d1f1d7767e423fb66..85f1030781ba94103c980f3b350e065bc5246ddf 100644 (file)
@@ -51,8 +51,7 @@ def main(global_config, **settings):
     config.add_route("player_hashkey_info_json", "/player/{hashkey:.{44}}.json")
     config.add_view(player_hashkey_info_json, route_name="player_hashkey_info_json", renderer="jsonp")
 
-    #config.add_route("player_hashkey_info_text", "/player/me")
-    config.add_route("player_hashkey_info_text", "/player/{hashkey}")
+    config.add_route("player_hashkey_info_text", "/player/me")
     config.add_view(player_hashkey_info_text, route_name="player_hashkey_info_text", renderer="player_hashkey_info_text.mako")
 
     config.add_route("player_info_json", "/player/{id:\d+}.json")
index a1945cc80791ea609970264e6c57c00a9e866f04..d6847024447f4704aa4707aeecbff6ff9b263897 100644 (file)
@@ -788,10 +788,7 @@ def player_damage_json(request):
 
 
 def player_hashkey_info_data(request):
-    #(idfp, status) = verify_request(request)
-    #print "player_hashkey_info_data [idfp={0} status={1}]".format(idfp, status)
-
-    hashkey = request.matchdict['hashkey']
+    (idfp, status) = verify_request(request)
 
     # if config is to *not* verify requests and we get nothing back, this
     # query will return nothing and we'll 404.
@@ -799,7 +796,7 @@ def player_hashkey_info_data(request):
         player = DBSession.query(Player).\
                 filter(Player.player_id == Hashkey.player_id).\
                 filter(Player.active_ind == True).\
-                filter(Hashkey.hashkey == hashkey).one()
+                filter(Hashkey.hashkey == idfp).one()
 
         games_played      = get_games_played(player.player_id)
         overall_stats     = get_overall_stats(player.player_id)