go_api_setting.py 464 B

12345678910111213
  1. from .tool.func import *
  2. async def api_setting(name = 'Test'):
  3. other_set = {}
  4. other_set["set_name"] = name
  5. other_set["ip"] = ip_check()
  6. func_name = sys._getframe().f_code.co_name
  7. if flask.request.method == 'PUT':
  8. func_name += '_put'
  9. other_set['data'] = flask.request.form.get('data', 'Test')
  10. return flask.Response(response = (await python_to_golang(func_name, other_set)), status = 200, mimetype = 'application/json')