From 1586309d3a6413ce10608f1d3dbbd8dd74235a03 Mon Sep 17 00:00:00 2001 From: "Manuel Weiser (aider)" Date: Mon, 2 Sep 2024 11:43:41 +0200 Subject: [PATCH] feat: allow admins to edit the "owned" status of games --- game_collection/user_management.py | 1 + 1 file changed, 1 insertion(+) diff --git a/game_collection/user_management.py b/game_collection/user_management.py index 783a980..88f571c 100644 --- a/game_collection/user_management.py +++ b/game_collection/user_management.py @@ -110,6 +110,7 @@ def edit_game(game_id): return jsonify({'message': 'Game not found!'}), 404 game.title = data.get('title', game.title) game.image = data.get('image', game.image) + game.owned = data.get('owned', game.owned) # Update owned status if provided db.session.commit() return jsonify({'message': 'Game updated!'}), 200