Merge branch 'master' of github.com:antzucaro/XonStat
authorAnt Zucaro <azucaro@gmail.com>
Sun, 25 Aug 2013 21:02:10 +0000 (17:02 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sun, 25 Aug 2013 21:02:10 +0000 (17:02 -0400)
xonstat/__init__.py
xonstat/views/player.py

index b60c35b..85f1030 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 a1945cc..d684702 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)