ApiHandler.py 513 B

1234567891011121314151617
  1. from handlers.HandlerBase import BaseHandler
  2. from model.DataBaseUtils import MysqlUtils
  3. import json
  4. import requests
  5. from model.DataBaseUtils import MysqlUtils
  6. class YgApiHandler(BaseHandler):
  7. def post(self):
  8. print(self.get_args())
  9. path=self.get_args()["path"]
  10. task_id=self.get_args()["taskId"]
  11. print(path)
  12. MysqlUtils().quchen_text.execute(f"update yangguang_path set path='{path}' where task_id='{task_id}'")
  13. self.write(json.dumps({"code":200,"msg":"ok"}))