ck 4 năm trước cách đây
mục cha
commit
b088a74739
2 tập tin đã thay đổi với 7 bổ sung3 xóa
  1. 5 1
      handlers/ApiHandler.py
  2. 2 2
      urls.py

+ 5 - 1
handlers/ApiHandler.py

@@ -1,14 +1,18 @@
 from handlers.HandlerBase import BaseHandler
 from model.DataBaseUtils import MysqlUtils
 import json
+import requests
 
-class ApiHandler(BaseHandler,MysqlUtils):
+class YgApiHandler(BaseHandler,MysqlUtils):
 
     def post(self):
         print(self.get_args())
+        print(type(self.get_args()))
         path=self.get_args()["path"]
         print(path)
         self.quchen_text.execute(f"replace into yangguang_path (path) values ('{path}')")
         self.write(json.dumps({"code":200,"msg":"ok"}))
 
 
+
+

+ 2 - 2
urls.py

@@ -1,11 +1,11 @@
 from handlers.PitcherPanelHandler import*
-from handlers.ApiHandler import ApiHandler
+from handlers.ApiHandler import YgApiHandler
 
 
 urls = [
     (r'/data/pitcher_panel/channel', PitcherPanelChannel),
     (r'/data/pitcher_panel/daily', PitcherPanelDaily),
     (r'/data/pitcher_panel/overview', PitcherPanelOverview),
-    (r'/api/get_yangguang_data',ApiHandler)
+    (r'/api/get_yangguang_data',YgApiHandler)
 
 ]