From cff1db8bcacb369938384c9b99116b7a3d9842b9 Mon Sep 17 00:00:00 2001 From: Renard Date: Tue, 21 Jul 2020 22:31:20 -0400 Subject: Mod API: Staff posts --- cgi/modapi.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cgi') diff --git a/cgi/modapi.py b/cgi/modapi.py index a3465e1..c76cb8b 100644 --- a/cgi/modapi.py +++ b/cgi/modapi.py @@ -67,6 +67,10 @@ def api_process(self, path_split): elif method == 'logs': logs = FetchAll("SELECT * FROM `logs` ORDER BY `timestamp` DESC") values['logs'] = logs + elif method == 'staffPosts': + posts = FetchAll( + "SELECT * FROM `news` WHERE type = '0' ORDER BY `timestamp` DESC") + values['posts'] = posts elif method == 'login': # testing username = formdata.get('username') -- cgit v1.2.1-18-gbd029