bugfix
This commit is contained in:
parent
5e9a5ed440
commit
82653ddfe5
@ -141,7 +141,8 @@ class UAPI:
|
|||||||
raise e
|
raise e
|
||||||
if uapi.auth_apiname:
|
if uapi.auth_apiname:
|
||||||
auth_uapi = await sor_get_uapi(sor, upappid, iuapi.auth_apiname)
|
auth_uapi = await sor_get_uapi(sor, upappid, iuapi.auth_apiname)
|
||||||
|
self.uapi = uapi
|
||||||
|
self.auth_uapi = auth_uapi
|
||||||
kinfo = await get_userapikey(sor, upappid, callerid)
|
kinfo = await get_userapikey(sor, upappid, callerid)
|
||||||
self.env.update(kinfo)
|
self.env.update(kinfo)
|
||||||
return auth_uapi, uapi
|
return auth_uapi, uapi
|
||||||
@ -183,6 +184,10 @@ class UAPI:
|
|||||||
b = b''
|
b = b''
|
||||||
async for chunk in self.__call__(upappid, apiname, callerid, params=params):
|
async for chunk in self.__call__(upappid, apiname, callerid, params=params):
|
||||||
b += chunk
|
b += chunk
|
||||||
|
if self.uapi.response:
|
||||||
|
dic = json.loads(b.decode('utf-8'))
|
||||||
|
s = self.rendertmpl(self.uapi.response, dic)
|
||||||
|
b = s.encode('utf-8')
|
||||||
return b
|
return b
|
||||||
|
|
||||||
async def do_auth(self, auth_uapi):
|
async def do_auth(self, auth_uapi):
|
||||||
@ -190,6 +195,9 @@ class UAPI:
|
|||||||
async for chunk in self.stream_resp(auth_uapi):
|
async for chunk in self.stream_resp(auth_uapi):
|
||||||
b+= chunk
|
b+= chunk
|
||||||
d = json.loads(b.encode('utf-8'))
|
d = json.loads(b.encode('utf-8'))
|
||||||
|
if auth_uapi.response:
|
||||||
|
s = self.rendertmpl(auth_uapi.response, d)
|
||||||
|
d = json.loads(s)
|
||||||
self.env.update(d)
|
self.env.update(d)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user