sku
This commit is contained in:
parent
abbd9837db
commit
6936d52903
Binary file not shown.
|
|
@ -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.
Loading…
Reference in New Issue