Compare commits

..

No commits in common. "59e0870f890911b1ee8a5b44fc90db35013b6402" and "a4c0d3cbb05344fb662854926cccf38fb7faad50" have entirely different histories.

View File

@ -108,7 +108,7 @@ a.orgid as userorgid,
a.apikey
from upappkey a, users b, upapp c
where b.orgid = c.ownerid
and a.ownerid = b.id
and a.ownerid = b.id
and a.upappid = c.id
and a.upappid = ${appid}$
"""
@ -143,7 +143,7 @@ where b.orgid = c.ownerid
i = randint(0, cnt - 1)
return users[i].userid
async def get_api_from_db(self, appid, apiname):
async def get_api(self, appid, apiname):
key = f'{appid}.{apiname}'
if _cache_enabled():
api = self.apidata.get(key)
@ -163,10 +163,3 @@ where b.orgid = c.ownerid
exception(f'{e}')
raise e
async def get_api(self, appid, apiname):
key = f'{appid}.{apiname}'
api = self.apidata.get(key)
if api:
return api
return await self.get_api_from_db(appid, apiname)