diff --git a/src/endpoints/general.py b/src/endpoints/general.py index d819278..bf34236 100644 --- a/src/endpoints/general.py +++ b/src/endpoints/general.py @@ -224,6 +224,8 @@ def consent_eula(): except Exception as e: logger.graylog_logger(level="error", handler="general-consent-eula", message=f"Error in consent_eula: {e}") elif request.method == "GET": + if request.cookies.get('bhvrSession') is None: + return jsonify({"isGiven": True}) userid = request.cookies.get('bhvrSession') is_given = mongo.eula(userId=userid, get_eula=True, server=mongo_host, db=mongo_db, collection=mongo_collection) if is_given: diff --git a/src/logic/mongodb_handler.py b/src/logic/mongodb_handler.py index 8d6b036..ea0cd98 100644 --- a/src/logic/mongodb_handler.py +++ b/src/logic/mongodb_handler.py @@ -33,7 +33,12 @@ class Mongo: 'steamid': steamid, 'userId': userId, 'token': token, - 'eula': False + 'eula': False, + 'xp': 0, + 'currency_blood_cells': 0, + 'currency_iron': 0, + 'currency_ink_cells': 0, + 'unlocked_items': [] } self.dyn_collection.insert_one(new_document)