aboutsummaryrefslogtreecommitdiff
path: root/api/user
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-03-10 14:37:12 +0100
committerlonkaars <l.leblansch@gmail.com>2021-03-10 14:37:12 +0100
commit1b8e3e479fb1fcea333571aaa3dd090ec78e346b (patch)
tree81e56c707a284f4e535ce947196dd0e8794924c0 /api/user
parentba0e25a47082ada94565da07b2451ff00d0e2857 (diff)
/user page use /user/games api
Diffstat (limited to 'api/user')
-rw-r--r--api/user/games.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/user/games.py b/api/user/games.py
index f08928a..43bd59e 100644
--- a/api/user/games.py
+++ b/api/user/games.py
@@ -29,7 +29,7 @@ def game_info(game_id, user_id = None):
return {
"id": game[0],
"parent": game[1],
- "moves": game[2],
+ "moves": [int(column) for move in str(game[2]).split(",")],
"opponent": game[3] if is_player_1 else game[4],
"outcome": outcome,
"created": game[6],
@@ -39,7 +39,7 @@ def game_info(game_id, user_id = None):
"rating_opponent": game[10] if is_player_1 else game[9],
"ruleset": resolve_ruleset(game[11]),
"status": game[12],
- "private": game[13],
+ "private": bool(game[13]),
}
def sum_games(user_id): #! SANITIZE USER_ID FIRST