]> git.mxchange.org Git - fba.git/blobdiff - daemon.py
Continued:
[fba.git] / daemon.py
index b16e9e994c137268bddca0ca1375a03153b6585e..f3f246f8cd8a3115c745dfc7e7d8c414065387a6 100755 (executable)
--- a/daemon.py
+++ b/daemon.py
@@ -123,6 +123,15 @@ WHERE {mode} = ? \
 ORDER BY domain \
 LIMIT ?", [value, amount]
         )
+    elif mode == "recently":
+        database.cursor.execute(
+            f"SELECT * \
+FROM instances \
+ORDER BY first_seen DESC \
+LIMIT ?", [amount]
+        )
+    else:
+        raise HTTPException(status_code=500, detail=f"mode='{mode}' is unsupported")
 
     domainlist = database.cursor.fetchall()
     return domainlist