diff --git a/API/__pycache__/rok.cpython-313.pyc b/API/__pycache__/rok.cpython-313.pyc index 5aa8619..49814e2 100644 Binary files a/API/__pycache__/rok.cpython-313.pyc and b/API/__pycache__/rok.cpython-313.pyc differ diff --git a/API/__pycache__/rokky.cpython-313.pyc b/API/__pycache__/rokky.cpython-313.pyc index 6c21fdc..d6776ce 100644 Binary files a/API/__pycache__/rokky.cpython-313.pyc and b/API/__pycache__/rokky.cpython-313.pyc differ diff --git a/API/df.py b/API/df.py index 1bd7282..62006b8 100644 --- a/API/df.py +++ b/API/df.py @@ -13,10 +13,10 @@ sys.path.insert(0, project_root) # print(db_price) -download_products() +# download_products() download_prices() decrypt_and_unpack("prices") -decrypt_and_unpack("products") -add_product() +# decrypt_and_unpack("products") +# add_product() update_prices() diff --git a/API/rok.py b/API/rok.py index 4cd8801..1d3d73d 100644 --- a/API/rok.py +++ b/API/rok.py @@ -189,7 +189,7 @@ def get_order_content(order_id): return content -# content = get_order_content(5388351) +# content = get_order_content(5388720) # print(content) # orders = get_orders() diff --git a/API/rokky.py b/API/rokky.py index 5b048f4..dd2ec58 100644 --- a/API/rokky.py +++ b/API/rokky.py @@ -173,7 +173,7 @@ def update_prices(): data = [] for item in prices: sku = item["sku"] - price = item.get("basePrice") + price = item.get("price") price_gg = item.get("baseSuggestedRetailPrice") price_sales =item.get("discountPercentage") is_sale = item.get("isSale") diff --git a/app/__pycache__/routes.cpython-313.pyc b/app/__pycache__/routes.cpython-313.pyc index c3ec9e1..0482685 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 8e33f1c..2d49943 100644 --- a/app/routes.py +++ b/app/routes.py @@ -4,7 +4,7 @@ import os import sqlite3 import json # from services.rokky import ones -from API.rok import create_order +from API.rok import create_order, get_order_content from API.TG import send_telegram from services.orders import get_sku from services.gg import get_product, create_messagea @@ -68,7 +68,7 @@ def index1(): return jsonify({"error": str(e)}), 500 conn.close() - create_order(sku_rokky, price_rokky, id_i) + send_telegram(create_order(sku_rokky, price_rokky, id_i)) return jsonify({"success": True}), 200 diff --git a/services/send_mai.py b/services/send_mai.py index 25e0e09..8f0d1d5 100644 --- a/services/send_mai.py +++ b/services/send_mai.py @@ -69,7 +69,7 @@ def send_html_flow(ids): "year": 2026 } to_addr = row[5] - # send_html_email(to_addr, data) + send_html_email(to_addr, data) message = ( f"🔹Спасибо за покупку в WST Keys (West Store Trusted Keys)\n\n" f"🔑 Ваш ключ: {row[13]}\n\n" @@ -77,7 +77,7 @@ def send_html_flow(ids): "💬 Если у вас возникнут вопросы — напишите нам.\n" "⭐️ Нам очень важно ваше мнение, пожалуйста, оставьте отзыв." ) - create_messagea(row[0], message ) + create_messagea(row[1], message )