go_api_give_auth.py 567 B

12345678910111213141516
  1. from .tool.func import *
  2. async def api_give_auth():
  3. if flask.request.method == 'PATCH':
  4. func_name = sys._getframe().f_code.co_name
  5. func_name += '_patch'
  6. other_set = {}
  7. other_set["ip"] = ip_check()
  8. other_set["user_name"] = flask.request.form.get('user_name', '')
  9. other_set['auth'] = flask.request.form.get('auth', '')
  10. other_set['change_auth'] = flask.request.form.get('change_auth', '')
  11. return flask.jsonify(await python_to_golang(func_name, other_set))
  12. else:
  13. return flask.jsonify({})