go_api_list_recent_discuss.py 649 B

1234567891011121314151617
  1. from .tool.func import *
  2. async def api_list_recent_discuss(num = 1, set_type = 'normal', limit = 10, legacy = 'on'):
  3. other_set = {}
  4. other_set["num"] = str(num)
  5. other_set["limit"] = str(limit)
  6. other_set["set_type"] = set_type
  7. other_set["legacy"] = legacy
  8. other_set["ip"] = ip_check()
  9. response = flask.make_response(flask.jsonify(await python_to_golang(sys._getframe().f_code.co_name, other_set)))
  10. response.headers.add("Access-Control-Allow-Origin", "*")
  11. response.headers.add('Access-Control-Allow-Headers', "Content-Type")
  12. response.headers.add('Access-Control-Allow-Methods', "GET")
  13. return response