This commit is contained in:
Alex55 2026-03-19 16:02:59 +02:00
parent abbd9837db
commit 6936d52903
3 changed files with 22 additions and 0 deletions

View File

@ -52,6 +52,28 @@ def new_order():
return jsonify({"status": "ok"}), 200 return jsonify({"status": "ok"}), 200
@main.route("/sku", methods=["POST"])
def sku():
if not request.is_json:
return jsonify({"error": "Invalid content type"}), 400
data = request.get_json()
print(data)
order_id = data.get("orderId")
if order_id is None:
return jsonify({"error": "orderId is required"}), 400
if not isinstance(order_id, int):
return jsonify({"error": "orderId must be int"}), 400
# TODO: обработка заказа
print(f"New order received: {order_id}")
# logging.warn(get_order_content(order_id))
logging.warn(f"NEWsku: {order_id}")
return jsonify({"status": "ok"}), 200
@main.route("/product") @main.route("/product")
def product_update(): def product_update():
# получаем параметры # получаем параметры

Binary file not shown.