This commit is contained in:
yumoqing 2025-09-22 18:11:12 +08:00
parent 357eb3f725
commit e636fbd81b

View File

@ -75,6 +75,7 @@ async def get_userapikey(sor, upappid, callerid):
'secretkey':None if r.secretkey is None else password_decode(r.secretkey), 'secretkey':None if r.secretkey is None else password_decode(r.secretkey),
'baseurl':r.baseurl, 'baseurl':r.baseurl,
'appownerid': r.appownerid, 'appownerid': r.appownerid,
'dynamic_func_name': r.dynamic_func,
'myappid': r.myappid 'myappid': r.myappid
}) })
@ -238,6 +239,18 @@ class UAPI:
if _params: if _params:
_params = json.loads(_params) _params = json.loads(_params)
debug(f'{headers=}, {body=}. {method=}, {url=}') debug(f'{headers=}, {body=}. {method=}, {url=}')
if self.env.dynamic_func_name:
f = RegisterFunction()
opts = {
'apikey': self.env.apikey,
'secretkey': self.env.secretkey,
'method':method,
'path':path,
'headers': headers,
'params':params,
'body':body
}
await f.exe(self.env.dynamic_func, opts)
shc = StreamHttpClient() shc = StreamHttpClient()
gen = shc(method, url, gen = shc(method, url,
headers=headers, headers=headers,