go_api_user_setting_editor.py 573 B

123456789101112131415
  1. from .tool.func import *
  2. async def api_user_setting_editor():
  3. other_set = {}
  4. other_set["ip"] = ip_check()
  5. func_name = sys._getframe().f_code.co_name
  6. if flask.request.method == 'POST':
  7. func_name += '_post'
  8. other_set['data'] = flask.request.form.get('data', 'Test')
  9. elif flask.request.method == 'DELETE':
  10. func_name += '_delete'
  11. other_set['data'] = flask.request.form.get('data', 'Test')
  12. return flask.Response(response = (await python_to_golang(func_name, other_set)), status = 200, mimetype = 'application/json')