fix: game_list_games语法修复
This commit is contained in:
parent
a437b5fe44
commit
a476ebffd9
@ -67,12 +67,16 @@ async def game_list_games(user_id):
|
|||||||
try:
|
try:
|
||||||
dbname = _get_dbname()
|
dbname = _get_dbname()
|
||||||
async with DBPools().sqlorContext(dbname) as sor:
|
async with DBPools().sqlorContext(dbname) as sor:
|
||||||
rows = await sor.R(game, {})
|
rows = await sor.R('game', {})
|
||||||
if rows:
|
if rows:
|
||||||
return [{game_id: r.id, game_name: r.name, desc: r.description or ,
|
out = []
|
||||||
icon: r.icon or fa-gamepad, world_id: , status: r.status} for r in rows]
|
for r in rows:
|
||||||
|
out.append({'game_id': r.id, 'game_name': r.name,
|
||||||
|
'desc': r.description or '', 'icon': r.icon or 'fa-gamepad',
|
||||||
|
'world_id': '', 'status': r.status})
|
||||||
|
return out
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
error(game_list_games: %s % e)
|
error('game_list_games: %s' % e)
|
||||||
return list(_GAME_CATALOG)
|
return list(_GAME_CATALOG)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user