ApiHandler.py 400 B

1234567891011121314
  1. from handlers.HandlerBase import BaseHandler
  2. from model.DataBaseUtils import MysqlUtils
  3. import json
  4. class ApiHandler(BaseHandler,MysqlUtils):
  5. def post(self):
  6. print(self.get_args())
  7. path=self.get_args()["path"]
  8. print(path)
  9. self.quchen_text.execute(f"replace into yangguang_path (path) values ('{path}')")
  10. self.write(json.dumps({"code":200,"msg":"ok"}))