From df888fad2bd1697f6c61930c486242764184d638 Mon Sep 17 00:00:00 2001 From: stickell Date: Sun, 24 Aug 2014 16:00:27 +0200 Subject: Revert 8446e16346ece5a934550f69e81d0cad528f7fba. It broke the WebUI. --- module/web/api_app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/web/api_app.py') diff --git a/module/web/api_app.py b/module/web/api_app.py index 0e95b559a..dd6f65927 100644 --- a/module/web/api_app.py +++ b/module/web/api_app.py @@ -24,8 +24,8 @@ class TBaseEncoder(json.JSONEncoder): # accepting positional arguments, as well as kwargs via post and get -@route('/api/') -@route('/api/', method='POST') +@route("/api/:func:args#[a-zA-Z0-9\-_/\"'\[\]%{}]*#") +@route("/api/:func:args#[a-zA-Z0-9\-_/\"'\[\]%{}]*#", method="POST") def call_api(func, args=""): response.headers.replace("Content-type", "application/json") response.headers.append("Cache-Control", "no-cache, must-revalidate") @@ -69,7 +69,7 @@ def callApi(func, *args, **kwargs): #post -> username, password -@route('/api/login', method='POST') +@route("/api/login", method="POST") def login(): response.headers.replace("Content-type", "application/json") response.headers.append("Cache-Control", "no-cache, must-revalidate") @@ -92,7 +92,7 @@ def login(): return json.dumps(True) -@route('/api/logout') +@route("/api/logout") def logout(): response.headers.replace("Content-type", "application/json") response.headers.append("Cache-Control", "no-cache, must-revalidate") -- cgit v1.2.3