12 lines
550 B
Plaintext
12 lines
550 B
Plaintext
# -*- coding: utf-8 -*-
|
||
# get_search_status.dspy —— 世界模式下拉数据源 [{value, text}](首项"全部")
|
||
try:
|
||
items = await get_world_mode_options(True)
|
||
return {"status": "ok", "data": items}
|
||
except Exception as e:
|
||
debug('get_search_status.dspy: ERROR %s' % str(e))
|
||
exception(format_exc())
|
||
return {"status": "error", "code": getattr(e, 'code', 'INTERNAL_ERROR'),
|
||
"message": getattr(e, 'message', str(e)) or str(e),
|
||
"field": getattr(e, 'field', ''), "detail": getattr(e, 'detail', '') or ''}
|