diff options
author | Renard | 2020-07-21 22:18:43 -0400 |
---|---|---|
committer | Renard | 2020-07-21 22:18:43 -0400 |
commit | 5a9699fed69e7c302d6363d2a81039477554c739 (patch) | |
tree | 17b57dccff1d86ae54eada4574f8d304a2e66b59 | |
parent | 7cf693695038a3377b4ac03e409bdac7ecf84d93 (diff) | |
download | weabot-5a9699fed69e7c302d6363d2a81039477554c739.tar.gz weabot-5a9699fed69e7c302d6363d2a81039477554c739.tar.xz weabot-5a9699fed69e7c302d6363d2a81039477554c739.zip |
Mod API: Reports
-rw-r--r-- | cgi/modapi.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cgi/modapi.py b/cgi/modapi.py index 82770ec..00b4beb 100644 --- a/cgi/modapi.py +++ b/cgi/modapi.py @@ -60,6 +60,11 @@ def api_process(self, path_split): news = FetchAll( "SELECT * FROM `news` WHERE type = 1 ORDER BY `timestamp` DESC") values['news'] = news + elif method == 'reports': + reports = FetchAll( + "SELECT * FROM `reports` ORDER BY `timestamp` DESC") + values['reports'] = reports + values['keys'] = reports[0].keys() elif method == 'login': # testing username = formdata.get('username') |