world_sync/wwwroot/api/get_search_sync_status.dspy

9 lines
454 B
Plaintext

result = [{'value': '', 'text': '全部'}]
try:
async with get_sor_context(request._run_ns, 'world_sync') as sor:
rows = await sor.sqlExe("select k as value, v as text from appcodes_kv where parentid='sync_status' order by k", {})
return json.dumps([{'value': '', 'text': '全部'}] + list(rows), ensure_ascii=False)
except Exception as e:
debug(f'get_search_sync_status error: {e}')
return json.dumps(result, ensure_ascii=False)