From a437b5fe4450bd6ac1eb88116be72b38988166a5 Mon Sep 17 00:00:00 2001 From: pipeline-agent Date: Sun, 30 Aug 2026 14:19:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=9F=9F=E6=A8=A1=E5=9E=8Bv2):=20game=5Fl?= =?UTF-8?q?ist=5Fgames=E6=94=B9=E8=AF=BBgame=E8=A1=A8=EF=BC=8C=E5=88=A0?= =?UTF-8?q?=E7=A1=AC=E7=BC=96=E7=A0=81=E7=9B=AE=E5=BD=95=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scense_game/core.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scense_game/core.py b/scense_game/core.py index ae7356e..bea1640 100644 --- a/scense_game/core.py +++ b/scense_game/core.py @@ -63,7 +63,16 @@ def _session_to_dict(r): # ---------------------------------------------------------------- W-08a 列表 async def game_list_games(user_id): - """游戏目录列表(内置演示游戏)。""" + """游戏目录(域模型v2:读 game 表;空时回退内置目录)。""" + try: + dbname = _get_dbname() + async with DBPools().sqlorContext(dbname) as sor: + rows = await sor.R(game, {}) + if rows: + return [{game_id: r.id, game_name: r.name, desc: r.description or , + icon: r.icon or fa-gamepad, world_id: , status: r.status} for r in rows] + except Exception as e: + error(game_list_games: %s % e) return list(_GAME_CATALOG)