diff --git a/game_collection/app.py b/game_collection/app.py index 31a4891..5fcd757 100644 --- a/game_collection/app.py +++ b/game_collection/app.py @@ -52,6 +52,9 @@ def get_games(): @app.route('/games/search', methods=['GET']) def search_game_api(): + if not authenticate(): # Ensure the user is authenticated + return jsonify({'message': 'Unauthorized access!'}), 401 + search_term = request.args.get('search_keywords') if not search_term: return jsonify({'message': 'No search term provided!'}), 400