diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-08-26 23:30:22 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-08-26 23:30:22 +0200 |
commit | 1edbca46b0aef5d6bc9ca2d8c28dd32a7e7e9cf5 (patch) | |
tree | 20be87efcda4501b17fca9056628aa92985445d7 /module/web/api_app.py | |
parent | Version number: 0.4.10 (diff) | |
download | pyload-1edbca46b0aef5d6bc9ca2d8c28dd32a7e7e9cf5.tar.xz |
Diffstat (limited to 'module/web/api_app.py')
-rw-r--r-- | module/web/api_app.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/web/api_app.py b/module/web/api_app.py index dd6f65927..0e95b559a 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/:func:args#[a-zA-Z0-9\-_/\"'\[\]%{}]*#") -@route("/api/:func:args#[a-zA-Z0-9\-_/\"'\[\]%{}]*#", method="POST") +@route('/api/<func><args:re:[a-zA-Z0-9\-_/\"\'\[\]%{}]*>') +@route('/api/<func><args:re:[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") |