From c8ee5b58665e7509654df2f52772349a3521f20f Mon Sep 17 00:00:00 2001 From: Renard Date: Wed, 11 Sep 2019 15:41:04 -0300 Subject: API: Blotter --- cgi/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cgi/api.py b/cgi/api.py index 19122d0..40fb5c6 100644 --- a/cgi/api.py +++ b/cgi/api.py @@ -385,6 +385,9 @@ def api_process(self, path_split): threads = getNewThreads(limit) values['threads'] = threads + elif method == "blotter": + latest_news = FetchAll("SELECT `timestamp`, `message`, `timestamp_formatted` FROM `news` WHERE `type` = '2' ORDER BY `timestamp` DESC LIMIT " + str(Settings.HOME_NEWS)) + values["news"] = latest_news else: raise APIError, "Invalid method" -- cgit v1.2.1-18-gbd029