This commit is contained in:
kramo
2023-03-24 21:53:55 +01:00
parent 06550c0138
commit bbf3703229
2 changed files with 3 additions and 3 deletions

View File

View File

@@ -20,6 +20,8 @@
import json
import os
from .save_games import save_games
def toggle_hidden(game):
games_dir = os.path.join(
@@ -38,6 +40,4 @@ def toggle_hidden(game):
data["hidden"] = not data["hidden"]
with open(os.path.join(games_dir, f"{game}.json"), "w") as open_file:
open_file.write(json.dumps(data, indent=4))
open_file.close()
save_games({data["game_id"]: data})