DmitrMakeev commited on
Commit
e76b673
·
verified ·
1 Parent(s): a13abe4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
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=['GET','POST'])
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.args.get('vk_id', '')
720
- order = request.args.get('order', '')
721
- status = request.args.get('status', '')
722
- del_flag = request.args.get('del', '')
723
- n_con_flag = request.args.get('n_con', '')
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