Merge worktree-endpoints: migrate all ref endpoints to SX with typed handlers
This commit is contained in:
@@ -226,10 +226,11 @@ def make_handler_def(name, params, body, env, opts=None):
|
||||
path = opts.get('path') if opts else None
|
||||
method = str(opts.get('method', 'get')) if opts else 'get'
|
||||
csrf = opts.get('csrf', True) if opts else True
|
||||
returns = str(opts.get('returns', 'element')) if opts else 'element'
|
||||
if isinstance(csrf, str):
|
||||
csrf = csrf.lower() not in ('false', 'nil', 'no')
|
||||
return HandlerDef(name=name, params=list(params), body=body, closure=dict(env),
|
||||
path=path, method=method.lower(), csrf=csrf)
|
||||
path=path, method=method.lower(), csrf=csrf, returns=returns)
|
||||
|
||||
|
||||
def make_query_def(name, params, doc, body, env):
|
||||
|
||||
Reference in New Issue
Block a user