From bce577cefcea7f6ce8f236b40be7b80de349c417 Mon Sep 17 00:00:00 2001 From: ZKWolf Date: Wed, 6 Dec 2023 21:49:23 +0100 Subject: [PATCH] Semi fixed Consent ID Exception --- src/endpoints/general.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/endpoints/general.py b/src/endpoints/general.py index aa4efff..6cd1489 100644 --- a/src/endpoints/general.py +++ b/src/endpoints/general.py @@ -232,6 +232,7 @@ def services_tex_events(): @app.route("/api/v1/consent/eula2", methods=["PUT", "GET"]) def consent_eula(): + # todo Fix this check_for_game_client("strict") session_cookie = sanitize_input(request.cookies.get("bhvrSession")) userid = session_manager.get_user_id(session_cookie) @@ -257,19 +258,10 @@ def consent_eula(): is_given = mongo.get_data_with_list(login=userid, login_steam=False, items={"eula"}) if is_given["eula"]: - return "", 204 - return jsonify({ - "Userid": "userid", - "ConsentList": [ - { - "ConsentId": "ZKApi", - "isGiven": True, - "UpdatedDate": 1689714606, - "AttentionNeeded": False, - "LatestVersion": "ZKApi" - } - ] - }) + return jsonify({"ConsentId": "ZKApi", "isGiven": True, "UpdatedDate": 1689714606, "AttentionNeeded": False, + "LatestVersion": {"Label": "ZKApi", "EntryDate": 1689714606 + }, "Userid": userid}) + else: return jsonify({"isGiven": False}) except Exception as e: