From 9b113a3bf32900cb0333516ef36c59e13d7e8a98 Mon Sep 17 00:00:00 2001 From: Pari Malam Date: Sat, 1 Feb 2025 11:06:47 +0800 Subject: [PATCH] released --- routes/playready.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/routes/playready.py b/routes/playready.py index 6e76440..8e7c1f1 100644 --- a/routes/playready.py +++ b/routes/playready.py @@ -15,19 +15,22 @@ CORS(playready_bp, resources={r"/*": {"origins": "*"}}, supports_credentials=Tru @cross_origin() def extension(): if not request.is_json: - return jsonify({"error": "Missing JSON in request"}), 400 + response_data = {"message": "Missing JSON in request."} + return jsonify({"responseData": response_data}), 400 data = request.get_json() action = data.get('action', None) if not action: - return jsonify({"error": "Missing action in request"}), 400 + response_data = {"message": "Missing action in request."} + return jsonify({"responseData": response_data}), 400 if action == "Challenge?": pssh = data.get('pssh', None) if not pssh: - return jsonify({"error": "Missing pssh in request"}), 400 + response_data = {"message": "Missing pssh in request."} + return jsonify({"responseData": response_data}), 400 playready = PLAYREADY() playready.pssh = pssh @@ -37,11 +40,13 @@ def extension(): license = data.get('license', None) if not license: - return jsonify({"error": "Missing license in request"}), 400 + response_data = {"message": "Missing license in request."} + return jsonify({"responseData": response_data}), 400 playready = PLAYREADY() playready.license = license return playready.get_license_keys() else: - return jsonify({"error": "Unknown action"}), 400 \ No newline at end of file + response_data = {"message": "Unknown action."} + return jsonify({"responseData": response_data}), 400 \ No newline at end of file