kk 2 years ago
parent
commit
ebd54eaea7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      server/conf_task.py

+ 2 - 2
server/conf_task.py

@@ -25,7 +25,7 @@ def getSource():
 
 
     result = MysqlHelper.get_values(sql)
     result = MysqlHelper.get_values(sql)
     if not result:
     if not result:
-        return jsonify({'return_code': '200', 'result': [], 'message': 'no data'})
+        return jsonify({'code': '200', 'result': [], 'message': 'no data'})
     source_list = list()
     source_list = list()
     for source, task_type, spider_name, machine in result:
     for source, task_type, spider_name, machine in result:
         data = dict(
         data = dict(
@@ -35,7 +35,7 @@ def getSource():
             machine=machine
             machine=machine
         )
         )
         source_list.append(data)
         source_list.append(data)
-    return jsonify({'return_code': '200', 'result': source_list})
+    return jsonify({'code': '200', 'result': source_list})
 
 
 
 
 @app.route("/v1/crawler/task/insert", methods=["POST"])
 @app.route("/v1/crawler/task/insert", methods=["POST"])