diff options
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/modapi.py | 7 |
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" |