Send sql data without wrapping

This commit is contained in:
Emily 2018-05-31 11:23:04 +02:00
parent 9f74fdeae5
commit 66a0324d49
3 changed files with 4 additions and 16 deletions

View File

@ -15,11 +15,7 @@ def handle(request):
if method is not None: if method is not None:
break break
output = { return callback(method_name, request.args.get(method_name))
"method": method_name,
"response": callback(method_name, request.args.get(method_name))
}
return output
def callback(method, data): def callback(method, data):
cur = glob.sql.cursor() cur = glob.sql.cursor()

View File

@ -15,13 +15,9 @@ def handle(request):
if method is not None: if method is not None:
break break
output = { return callback(method_name)
"method": method_name,
"response": callback(method_name, request.args.get(method_name))
}
return output
def callback(method, data): def callback(method):
cur = glob.sql.cursor() cur = glob.sql.cursor()
cur.execute("SELECT {} FROM updates WHERE filename = 'osu!.exe' ORDER BY file_version".format( cur.execute("SELECT {} FROM updates WHERE filename = 'osu!.exe' ORDER BY file_version".format(

View File

@ -15,11 +15,7 @@ def handle(request):
if method is not None: if method is not None:
break break
output = { return callback(method_name, request.args.get(method_name))
"method": method_name,
"response": callback(method_name, request.args.get(method_name))
}
return output
def callback(method, data): def callback(method, data):
cur = glob.sql.cursor() cur = glob.sql.cursor()