go_api_list_recent_change.py 816 B

1234567891011121314151617181920
  1. from .tool.func import *
  2. async def api_list_recent_change(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. return await python_to_golang(sys._getframe().f_code.co_name, other_set)
  10. async def api_list_recent_change_exter(num = 1, set_type = 'normal', limit = 10, legacy = 'on'):
  11. response = flask.make_response(flask.jsonify(await api_list_recent_change(num, set_type, limit, legacy)))
  12. response.headers.add("Access-Control-Allow-Origin", "*")
  13. response.headers.add('Access-Control-Allow-Headers', "Content-Type")
  14. response.headers.add('Access-Control-Allow-Methods', "GET")
  15. return response