summaryrefslogtreecommitdiffstats
path: root/pyload/webui/app/api.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-17 01:21:41 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-17 01:21:41 +0200
commit20226f8cc5889efbefa61209e1adf6184d42cd00 (patch)
tree8f01af2c23465432f83481b656ed8c2743cb872a /pyload/webui/app/api.py
parentSpare code cosmetics (2) (diff)
downloadpyload-20226f8cc5889efbefa61209e1adf6184d42cd00.tar.xz
Spare code cosmetics (3)
Diffstat (limited to 'pyload/webui/app/api.py')
-rw-r--r--pyload/webui/app/api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyload/webui/app/api.py b/pyload/webui/app/api.py
index dd8521a07..2ec342fe2 100644
--- a/pyload/webui/app/api.py
+++ b/pyload/webui/app/api.py
@@ -37,7 +37,7 @@ def call_api(func, args=""):
if not s or not s.get("authenticated", False):
return HTTPError(403, json.dumps("Forbidden"))
- if not PYLOAD.isAuthorized(func, {"role": s["role"], "permission": s["perms"]}):
+ if not PYLOAD.isAuthorized(func, {"role": s['role'], "permission": s['perms']}):
return HTTPError(401, json.dumps("Unauthorized"))
args = args.split("/")[1:]
@@ -86,7 +86,7 @@ def login():
# get the session id by dirty way, documentations seems wrong
try:
- sid = s._headers["cookie_out"].split("=")[1].split(";")[0]
+ sid = s._headers['cookie_out'].split("=")[1].split(";")[0]
return json.dumps(sid)
except Exception:
return json.dumps(True)