Parcourir la source

develop-0520-reformat-code

luojunhui il y a 1 mois
Parent
commit
a7f3b67836
1 fichiers modifiés avec 6 ajouts et 7 suppressions
  1. 6 7
      pqai_agent_server/api_server.py

+ 6 - 7
pqai_agent_server/api_server.py

@@ -232,20 +232,19 @@ def get_conversation_list():
     return wrap_response(200, data=response)
 
 
-@app.route("/api/quitHumanInterventionStatus", methods=["POST"])
-def quit_human_intervention_status():
+@app.route("/api/quitHumanInterventionStatus", methods=["GET"])
+def quit_human_interventions_status():
     """
     退出人工介入状态
     :return:
     """
-    data = request.get_json()
-    user_id = data["user_id"]
-    staff_id = data["staff_id"]
+    staff_id = request.args.get("staff_id")
+    customer_id = request.args.get("customer_id")
     # 测试环境: staff_id 强制等于1688854492669990
     staff_id = 1688854492669990
-    if not user_id or not staff_id:
+    if not customer_id or not staff_id:
         return wrap_response(404, msg="user_id and staff_id are required")
-    response = quit_human_intervention_status(user_id, staff_id)
+    response = quit_human_intervention_status(customer_id, staff_id)
 
     return wrap_response(200, data=response)