llmage/wwwroot/api/get_search_upappid.dspy
yumoqing bb4900f997 feat: add get_search_{fieldname}.dspy for codes fields with 全部 option
- get_search_providerid.dspy: organization list with 全部 as first entry
- get_search_upappid.dspy: upapp list with 全部 as first entry
- json/llm.json: update alters dataurl to use search scripts
- load_path.py: register new RBAC paths
2026-06-04 17:22:50 +08:00

16 lines
416 B
Plaintext

result = [{'upappid': '', 'upappid_text': '全部'}]
try:
async with get_sor_context(request._run_ns, 'uapi') as sor:
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_search_upappid error: {e}')
return json.dumps(result, ensure_ascii=False)