diff --git a/API/__pycache__/rok.cpython-313.pyc b/API/__pycache__/rok.cpython-313.pyc index 49814e2..d6f2f5e 100644 Binary files a/API/__pycache__/rok.cpython-313.pyc and b/API/__pycache__/rok.cpython-313.pyc differ diff --git a/app/__pycache__/routes.cpython-313.pyc b/app/__pycache__/routes.cpython-313.pyc index 33fcdec..872ce78 100644 Binary files a/app/__pycache__/routes.cpython-313.pyc and b/app/__pycache__/routes.cpython-313.pyc differ diff --git a/app/routes.py b/app/routes.py index e4b7af1..f016118 100644 --- a/app/routes.py +++ b/app/routes.py @@ -29,6 +29,7 @@ def get_image(filename): @main.route("/orders/api_payments", methods=["POST", "GET"]) def index1(): + DB_PATH = "./files/rokky.db" # Получаем все GET-параметры params = request.args.to_dict() logging.warn(f"newOrder: {params}") @@ -42,11 +43,11 @@ def index1(): date = params.get("date") # всё остальное сохраняем как JSON content = json.dumps(params, ensure_ascii=False) - + send_telegram(content) message = f"🔹Спасибо за покупку в WST Keys (West Store Trusted Keys)\n\n ⏳ Ваш заказ обрабатывается и будет доставлен автоматически" create_messagea(id_i, message) - name_p, im = get_product(id_d) + # name_p, im = get_product(id_d) sku_rokky, price_rokky = get_sku(id_d) @@ -77,6 +78,7 @@ def index1(): @main.route("/newOrder", methods=["POST"]) def new_order(): + if not request.is_json: return jsonify({"error": "Invalid content type"}), 400