From 73070f63128ef178bb15f64ebaf1c770cc40e5ce Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 12 Mar 2021 10:30:39 +0100 Subject: api error fix + recent games link to user --- api/user/preferences.py | 2 +- components/recentGames.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/api/user/preferences.py b/api/user/preferences.py index bfbfe66..6c8a6f3 100644 --- a/api/user/preferences.py +++ b/api/user/preferences.py @@ -1,5 +1,5 @@ from flask import Blueprint, request -from db import cursor +from db import cursor, connection from auth.login_token import token_login import json diff --git a/components/recentGames.tsx b/components/recentGames.tsx index a37f662..4eaed91 100644 --- a/components/recentGames.tsx +++ b/components/recentGames.tsx @@ -53,7 +53,12 @@ export default function RecentGames(props: { games?: Array }) { { props.games?.map(game => - {game.opponent?.username} + + {game.opponent?.username} + {Math.max(0, game.moves.length -1)} {(() => { -- cgit v1.2.3