bugfix
This commit is contained in:
parent
45643f1f2d
commit
f67e19b405
@ -61,12 +61,26 @@ async def get_userapikey(sor, upappid, callerid):
|
||||
a.myappid,
|
||||
a.ownerid as appownerid,
|
||||
a.baseurl,
|
||||
b.apikey,
|
||||
a.secretkey
|
||||
from upapp a, upappkey b
|
||||
where a.id = b.upappid
|
||||
and a.id = ${appid}$
|
||||
and b.ownerid = ${ownerid}$"""
|
||||
a.secretkey,
|
||||
b.apikey
|
||||
from upapp a left join
|
||||
(select * from upappkey
|
||||
where upappid=${appid}$
|
||||
and ownerid = ${ownerid}$) b
|
||||
on a.id = b.upappid
|
||||
where a.id = ${appid}$"""
|
||||
sql = """select
|
||||
a.myappid,
|
||||
a.ownerid as appownerid,
|
||||
a.baseurl,
|
||||
a.secretkey,
|
||||
b.apikey
|
||||
from upapp a left join
|
||||
(select * from upappkey
|
||||
where upappid=${appid}$
|
||||
and ownerid = ${ownerid}$) b
|
||||
on a.id = b.upappid
|
||||
where a.id = ${appid}$"""
|
||||
recs = await sor.sqlExe(sql, {'appid':upappid, 'ownerid': callerid})
|
||||
if len(recs) < 1:
|
||||
e = Exception(f'{upappid=}, {callerid=} has not apikey')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user