fix function nameing

This commit is contained in:
2025-04-28 16:14:04 +02:00
parent c5c2652f3a
commit 8424c324e8
+4 -4
View File
@@ -54,10 +54,10 @@ class Server:
"server", "battlesnake/github/starter-snake-python"
)
return response
@self.app.post("/cleanup")
@self.app.get("/cleanup")
def cleanup():
self._cleanup()
self._cleanup_database()
def run(self, host:str="0.0.0.0", port:str="8000", debug:bool=False):
logging.getLogger("werkzeug").setLevel(logging.ERROR)
@@ -157,6 +157,6 @@ class Server:
print("GAME ENDED: Winner is", [ x["name"] for x in game_state["board"]['snakes']])
self._delete_game_board(game_state)
def _cleanup(self):
def _cleanup_database(self):
storage = StorageLoader.build(self.storage_type)
return jsonify(storage.cleanup())