From d20d31b2005863d2647e5153cfcdb8fe269d8927 Mon Sep 17 00:00:00 2001 From: Krateng Date: Thu, 23 May 2019 14:25:35 +0200 Subject: [PATCH] Fixed some API endpoints --- database.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/database.py b/database.py index 5d27693..e054196 100644 --- a/database.py +++ b/database.py @@ -189,8 +189,7 @@ dbserver = API(delay=True,path="api") @dbserver.get("test") -def test_server(): - apikey = request.query.get("key") +def test_server(key=None): response.set_header("Access-Control-Allow-Origin","*") if apikey is not None and not (checkAPIkey(apikey)): response.status = 403 @@ -437,9 +436,7 @@ def get_performance(**keys): @dbserver.get("top/artists") -def get_top_artists_external(): - - keys = FormsDict.decode(request.query) +def get_top_artists_external(**keys): _, k_time, k_internal, _ = uri_to_internal(keys) ckeys = {**k_time, **k_internal}