]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 12 Jun 2023 18:09:38 +0000 (20:09 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 12 Jun 2023 18:09:38 +0000 (20:09 +0200)
- better query `last_error_details` as this column is always set to NULL on
  success

api.py

diff --git a/api.py b/api.py
index 4af491aba0ea4e6a4650f9ea0788a47a22a04c51..33d09f514e1b948865f8396eda8abc9e2d9ef299 100644 (file)
--- a/api.py
+++ b/api.py
@@ -40,7 +40,7 @@ templates = Jinja2Templates(directory="templates")
 
 @router.get(config.get("base_url") + "/api/info.json", response_class=JSONResponse)
 def api_info():
-    fba.cursor.execute("SELECT (SELECT COUNT(domain) FROM instances), (SELECT COUNT(domain) FROM instances WHERE software IN ('pleroma', 'mastodon', 'misskey', 'friendica', 'bookwyrm', 'takahe', 'peertube')), (SELECT COUNT(blocker) FROM blocks), (SELECT COUNT(domain) FROM instances WHERE last_status_code IS NOT NULL)")
+    fba.cursor.execute("SELECT (SELECT COUNT(domain) FROM instances), (SELECT COUNT(domain) FROM instances WHERE software IN ('pleroma', 'mastodon', 'misskey', 'friendica', 'bookwyrm', 'takahe', 'peertube')), (SELECT COUNT(blocker) FROM blocks), (SELECT COUNT(domain) FROM instances WHERE last_error_details IS NOT NULL)")
     row = fba.cursor.fetchone()
 
     return {