diff options
author | stickell <l.stickell@yahoo.it> | 2014-08-24 16:00:27 +0200 |
---|---|---|
committer | stickell <l.stickell@yahoo.it> | 2014-08-24 16:00:27 +0200 |
commit | df888fad2bd1697f6c61930c486242764184d638 (patch) | |
tree | 290e04ade53e7f01ae74b2c7f886f711e8062afa /module/web/json_app.py | |
parent | [MultiHoster] Fixed crash due to getConf deprecation (diff) | |
download | pyload-df888fad2bd1697f6c61930c486242764184d638.tar.xz |
Revert 8446e16346ece5a934550f69e81d0cad528f7fba. It broke the WebUI.
Diffstat (limited to 'module/web/json_app.py')
-rw-r--r-- | module/web/json_app.py | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/module/web/json_app.py b/module/web/json_app.py index 79e9d4012..0212c27ea 100644 --- a/module/web/json_app.py +++ b/module/web/json_app.py @@ -25,8 +25,8 @@ def get_sort_key(item): return item["order"] -@route('/json/status') -@route('/json/status', method='POST') +@route("/json/status") +@route("/json/status", method="POST") @login_required('LIST') def status(): try: @@ -37,8 +37,8 @@ def status(): return HTTPError() -@route('/json/links') -@route('/json/links', method='POST') +@route("/json/links") +@route("/json/links", method="POST") @login_required('LIST') def links(): try: @@ -64,7 +64,7 @@ def links(): return HTTPError() -@route('/json/packages') +@route("/json/packages") @login_required('LIST') def packages(): print "/json/packages" @@ -82,7 +82,7 @@ def packages(): return HTTPError() -@route('/json/package/<id:int>') +@route("/json/package/<id:int>") @login_required('LIST') def package(id): try: @@ -117,7 +117,7 @@ def package(id): return HTTPError() -@route('/json/package_order/<ids>') +@route("/json/package_order/:ids") @login_required('ADD') def package_order(ids): try: @@ -128,7 +128,7 @@ def package_order(ids): return HTTPError() -@route('/json/abort_link/<id:int>') +@route("/json/abort_link/<id:int>") @login_required('DELETE') def abort_link(id): try: @@ -138,7 +138,7 @@ def abort_link(id): return HTTPError() -@route('/json/link_order/<ids>') +@route("/json/link_order/:ids") @login_required('ADD') def link_order(ids): try: @@ -149,8 +149,8 @@ def link_order(ids): return HTTPError() -@route('/json/add_package') -@route('/json/add_package', method='POST') +@route("/json/add_package") +@route("/json/add_package", method="POST") @login_required('ADD') def add_package(): name = request.forms.get("add_name", "New Package").strip() @@ -185,7 +185,7 @@ def add_package(): PYLOAD.setPackageData(pack, data) -@route('/json/move_package/<dest:int>/<id:int>') +@route("/json/move_package/<dest:int>/<id:int>") @login_required('MODIFY') def move_package(dest, id): try: @@ -195,7 +195,7 @@ def move_package(dest, id): return HTTPError() -@route('/json/edit_package', method='POST') +@route("/json/edit_package", method="POST") @login_required('MODIFY') def edit_package(): try: @@ -211,8 +211,8 @@ def edit_package(): return HTTPError() -@route('/json/set_captcha') -@route('/json/set_captcha', method='POST') +@route("/json/set_captcha") +@route("/json/set_captcha", method="POST") @login_required('ADD') def set_captcha(): if request.environ.get('REQUEST_METHOD', "GET") == "POST": @@ -231,7 +231,7 @@ def set_captcha(): return {'captcha': False} -@route('/json/load_config/<category>/<section>') +@route("/json/load_config/:category/:section") @login_required("SETTINGS") def load_config(category, section): conf = None @@ -251,7 +251,7 @@ def load_config(category, section): return render_to_response("settings_item.html", {"skey": section, "section": conf[section]}) -@route('/json/save_config/<category>', method='POST') +@route("/json/save_config/:category", method="POST") @login_required("SETTINGS") def save_config(category): for key, value in request.POST.iteritems(): @@ -265,7 +265,7 @@ def save_config(category): PYLOAD.setConfigValue(section, option, decode(value), category) -@route('/json/add_account', method='POST') +@route("/json/add_account", method="POST") @login_required("ACCOUNTS") def add_account(): login = request.POST["account_login"] @@ -275,7 +275,7 @@ def add_account(): PYLOAD.updateAccount(type, login, password) -@route('/json/update_accounts', method='POST') +@route("/json/update_accounts", method="POST") @login_required("ACCOUNTS") def update_accounts(): deleted = [] #dont update deleted accs or they will be created again @@ -299,7 +299,7 @@ def update_accounts(): deleted.append((plugin,user)) PYLOAD.removeAccount(plugin, user) -@route('/json/change_password', method='POST') +@route("/json/change_password", method="POST") def change_password(): user = request.POST["user_login"] |