Browse Source

flask_app: 增加接口

Signed-off-by: binren <zhangbr@elab-plus.com>
binren 5 years ago
parent
commit
4fdb530b81
1 changed files with 10 additions and 1 deletions
  1. 10 1
      flask_app.py

+ 10 - 1
flask_app.py

@@ -170,7 +170,6 @@ def tongce_data():
     response = {}
     tongce = TongCe()
     try:
-        tongce.table_type_insert()
         result = tongce.lingdi_data_scores()
         response['code'] = 0
         response['message'] = '成功'
@@ -184,6 +183,16 @@ def tongce_data():
     return json.dumps(response, ensure_ascii=False)
 
 
+@app.route('/update_rule', methods=['GET', 'POST'])
+def tongce_update_rule():
+    try:
+        tongce = TongCe()
+        tongce.table_type_insert()
+    except Exception as e:
+        return str(e)
+    return '更新成功!! 1'
+
+
 @app.route('/update_other_city', methods=['GET', 'POST'])
 def update_other_city():
     response = {}