aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cgi/modapi.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/cgi/modapi.py b/cgi/modapi.py
index 9b94c0f..b05410d 100644
--- a/cgi/modapi.py
+++ b/cgi/modapi.py
@@ -66,6 +66,8 @@ def api_process(self, path_split):
logAction('', 'Failed log-in. Username:'+_mysql.escape_string(
self.formdata['username'])+' IP:'+self.environ["REMOTE_ADDR"])
raise APIError, "Incorrect username/password."
+ else:
+ raise APIError, "Bad request"
else:
raise APIError, "Not authenticated"
else:
@@ -85,11 +87,7 @@ def api_process(self, path_split):
"SELECT * FROM `news` WHERE type = '0' ORDER BY `timestamp` DESC")
values['posts'] = posts
elif method == 'login':
- # testing
- username = formdata.get('username')
- password = formdata.get('password')
- values['username'] = username
- values['password'] = password
+ values['token'] = token
else:
raise APIError, "Invalid method"