Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -706,21 +706,22 @@ def write_order_vk_full():
|
|
706 |
|
707 |
|
708 |
# Работа из VK_ID только по VK ID
|
709 |
-
@app.route('/wr_order_vk', methods=['
|
710 |
def wr_order_vk():
|
711 |
try:
|
712 |
logging.debug("Starting wr_order_vk")
|
713 |
-
api_sys_control = request.args.get('api_sys')
|
714 |
|
|
|
|
|
715 |
if api_sys_control != api_key_sys:
|
716 |
logging.warning("Unauthorized access attempt")
|
717 |
return json.dumps({"error": "Unauthorized access"}), 403
|
718 |
-
|
719 |
-
vkid = request.
|
720 |
-
order = request.
|
721 |
-
status = request.
|
722 |
-
del_flag = request.
|
723 |
-
n_con_flag = request.
|
724 |
|
725 |
if not vkid:
|
726 |
logging.error("VK ID is required")
|
@@ -777,7 +778,6 @@ def wr_order_vk():
|
|
777 |
|
778 |
|
779 |
|
780 |
-
|
781 |
|
782 |
|
783 |
|
|
|
706 |
|
707 |
|
708 |
# Работа из VK_ID только по VK ID
|
709 |
+
@app.route('/wr_order_vk', methods=['POST'])
|
710 |
def wr_order_vk():
|
711 |
try:
|
712 |
logging.debug("Starting wr_order_vk")
|
|
|
713 |
|
714 |
+
# Читаем параметры из POST-запроса
|
715 |
+
api_sys_control = request.form.get('api_sys')
|
716 |
if api_sys_control != api_key_sys:
|
717 |
logging.warning("Unauthorized access attempt")
|
718 |
return json.dumps({"error": "Unauthorized access"}), 403
|
719 |
+
|
720 |
+
vkid = request.form.get('vk_id', '')
|
721 |
+
order = request.form.get('order', '')
|
722 |
+
status = request.form.get('status', '')
|
723 |
+
del_flag = request.form.get('del', '')
|
724 |
+
n_con_flag = request.form.get('n_con', '')
|
725 |
|
726 |
if not vkid:
|
727 |
logging.error("VK ID is required")
|
|
|
778 |
|
779 |
|
780 |
|
|
|
781 |
|
782 |
|
783 |
|