From 0dea8f430e4905da98d7009bdf111e0965fedd22 Mon Sep 17 00:00:00 2001 From: raylu Date: Tue, 22 Oct 2013 19:29:47 -0700 Subject: alliance and character pages --- web/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web/api.py') diff --git a/web/api.py b/web/api.py index 523880b..5f21441 100644 --- a/web/api.py +++ b/web/api.py @@ -29,9 +29,9 @@ class SearchHandler(APIHandler): data = db.queries.search(q) self.respond_json(data) -class CorporationHandler(APIHandler): - def get(self, corp_id): - kills = db.queries.corporation(int(corp_id)) +class KillListHandler(APIHandler): + def get(self, entity_type, entity_id): + kills = db.queries.kill_list(entity_type, int(entity_id)) self.respond_json(kills) class KillHandler(APIHandler): @@ -43,7 +43,7 @@ def start(): tornado.web.Application( handlers=[ (r'/search', SearchHandler), - (r'/corporation/(.+)', CorporationHandler), + (r'/(alliance|corporation|character)/(.+)', KillListHandler), (r'/kill/(.+)', KillHandler), ], debug=config.debug, -- cgit v1.2.3