aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Renard 2020-07-17 17:29:17 -0400
committerLibravatar Renard 2020-07-17 17:29:17 -0400
commitacedc645c398d6afeff3a8f2e500220da3c8549d (patch)
tree8774c485b62698e4f7594decfbf293e6de57f404
parent5c0e486ac70425dc88f074bfcf1ad4acff6aaffd (diff)
downloadweabot-acedc645c398d6afeff3a8f2e500220da3c8549d.tar.gz
weabot-acedc645c398d6afeff3a8f2e500220da3c8549d.tar.xz
weabot-acedc645c398d6afeff3a8f2e500220da3c8549d.zip
Test
-rw-r--r--cgi/modapi.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cgi/modapi.py b/cgi/modapi.py
index d80a689..82770ec 100644
--- a/cgi/modapi.py
+++ b/cgi/modapi.py
@@ -10,6 +10,7 @@ from post import *
def api(self, path_split):
validated = False
+ staff_account = None
manage_cookie = getCookie(self, 'weabot_manage')
if manage_cookie:
@@ -59,6 +60,12 @@ def api_process(self, path_split):
news = FetchAll(
"SELECT * FROM `news` WHERE type = 1 ORDER BY `timestamp` DESC")
values['news'] = news
+ elif method == 'login':
+ # testing
+ username = formdata.get('username')
+ password = formdata.get('password')
+ values['username'] = username
+ values['password'] = password
else:
raise APIError, "Invalid method"