17 lines
404 B
Plaintext
17 lines
404 B
Plaintext
result = []
|
|
|
|
try:
|
|
async with get_sor_context(request._run_ns, 'uapi') as sor:
|
|
user_orgid = await get_userorgid()
|
|
apps = await sor.sqlExe(
|
|
"select id, name from upapp order by name",
|
|
{}
|
|
)
|
|
if apps:
|
|
for r in apps:
|
|
result.append({'upappid': str(r.id), 'upappid_text': r.name or ''})
|
|
except Exception as e:
|
|
debug(f'get_upapps error: {e}')
|
|
|
|
return json.dumps(result, ensure_ascii=False)
|