allow to return cleaned up values

This commit is contained in:
2025-05-15 09:55:12 +02:00
parent 4d515f0784
commit 58bbbf3cbd
2 changed files with 11 additions and 9 deletions
+3 -2
View File
@@ -57,7 +57,8 @@ class Server:
@self.app.get("/cleanup")
def cleanup():
self._cleanup_database()
results = self._cleanup_database()
return jsonify(data=json.loads(results), status=200)
def run(self, host:str="0.0.0.0", port:str="8000", debug:bool=False):
logging.getLogger("werkzeug").setLevel(logging.ERROR)
@@ -159,4 +160,4 @@ class Server:
def _cleanup_database(self):
storage = StorageLoader.build(self.storage_type)()
return jsonify(storage.cleanup())
return storage.cleanup()