world_snapshot/wwwroot/api/get_search_status.dspy
2026-08-29 12:44:24 +08:00

12 lines
432 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# world_snapshot get_search_status.dspy
# 下拉:快照状态([{value,text}],首项"全部"
result = [{'value': '', 'text': '全部'}]
try:
options = await list_snapshot_statuses()
if options:
result = result + list(options)
return json.dumps(result, ensure_ascii=False)
except Exception as e:
debug(f'get_search_status.dspy error: {format_exc()}')
return json.dumps(result, ensure_ascii=False)