go_api_w_raw.py 539 B

12345678910111213
  1. from .tool.func import *
  2. async def api_w_raw(name = 'Test', rev = '', exist_check = ''):
  3. with get_db_connect() as conn:
  4. if acl_check(conn, name, 'render') != 1:
  5. other_set = {}
  6. other_set["name"] = name
  7. other_set["rev"] = str(rev)
  8. other_set["exist_check"] = exist_check
  9. return flask.Response(response = (await python_to_golang(sys._getframe().f_code.co_name, other_set)), status = 200, mimetype = 'application/json')
  10. else:
  11. return flask.jsonify({})