allow to return cleaned up values
This commit is contained in:
+3
-2
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user