bugfix
This commit is contained in:
parent
0f0d32b7c3
commit
16418f174e
@ -1,6 +1,9 @@
|
|||||||
|
|
||||||
from time import time
|
from time import time
|
||||||
from appPublic.aes import aes_encrypt_ecb, aes_decrypt_ecb
|
from appPublic.aes import aes_encrypt_ecb, aes_decrypt_ecb
|
||||||
|
from sqlor.dbpools import DBPools
|
||||||
|
from ahserver.serverenv import get_serverenv
|
||||||
|
from ahserver.auth_api import get_session_userinfo
|
||||||
|
|
||||||
def build_beardata(appid, apikey, secretkey):
|
def build_beardata(appid, apikey, secretkey):
|
||||||
"""
|
"""
|
||||||
@ -13,3 +16,21 @@ def build_beardata(appid, apikey, secretkey):
|
|||||||
cyber = aes_encrypt_ecb(secretkey, txt)
|
cyber = aes_encrypt_ecb(secretkey, txt)
|
||||||
return f'Bear {appid}-:-{cyber}'
|
return f'Bear {appid}-:-{cyber}'
|
||||||
|
|
||||||
|
async def get_org(sor, orgid):
|
||||||
|
orgs = await sor.R('organization', {'id': orgid})
|
||||||
|
if len(orgs) < 1:
|
||||||
|
return None
|
||||||
|
return orgs[0]
|
||||||
|
|
||||||
|
|
||||||
|
async def sync_users(request, upappid, orgid):
|
||||||
|
db = DBPools()
|
||||||
|
dbname = get_dbname()
|
||||||
|
async with db.sqlorContext(dbname) as sor:
|
||||||
|
upapp = await get_upapp(sor, upappid)
|
||||||
|
async def sysn_user(request, upappid, userid):
|
||||||
|
db = DBPools()
|
||||||
|
dbname = get_dbname()
|
||||||
|
async with db.sqlorContext(dbname) as sor:
|
||||||
|
upapp = await get_upapp(sor, upappid)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user