From acedc645c398d6afeff3a8f2e500220da3c8549d Mon Sep 17 00:00:00 2001 From: Renard Date: Fri, 17 Jul 2020 17:29:17 -0400 Subject: Test --- cgi/modapi.py | 7 +++++++ 1 file changed, 7 insertions(+) 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" -- cgit v1.2.1-18-gbd029