diff --git a/handlers/getfile.py b/handlers/getfile.py index 2ad60d7..171bc25 100644 --- a/handlers/getfile.py +++ b/handlers/getfile.py @@ -15,11 +15,7 @@ def handle(request): if method is not None: break - output = { - "method": method_name, - "response": callback(method_name, request.args.get(method_name)) - } - return output + return callback(method_name, request.args.get(method_name)) def callback(method, data): cur = glob.sql.cursor() diff --git a/handlers/getlist.py b/handlers/getlist.py index a14b82a..7233dcd 100644 --- a/handlers/getlist.py +++ b/handlers/getlist.py @@ -15,13 +15,9 @@ def handle(request): if method is not None: break - output = { - "method": method_name, - "response": callback(method_name, request.args.get(method_name)) - } - return output + return callback(method_name) -def callback(method, data): +def callback(method): cur = glob.sql.cursor() cur.execute("SELECT {} FROM updates WHERE filename = 'osu!.exe' ORDER BY file_version".format( diff --git a/handlers/getupdate.py b/handlers/getupdate.py index f51fed0..1e5e5b9 100644 --- a/handlers/getupdate.py +++ b/handlers/getupdate.py @@ -15,11 +15,7 @@ def handle(request): if method is not None: break - output = { - "method": method_name, - "response": callback(method_name, request.args.get(method_name)) - } - return output + return callback(method_name, request.args.get(method_name)) def callback(method, data): cur = glob.sql.cursor()