From 5b585254a498dcfd7ca7fb052c7f30fe3a06de4b Mon Sep 17 00:00:00 2001 From: Tim Glasgow Date: Tue, 9 Aug 2022 07:39:19 -0500 Subject: [PATCH] score typing --- squarenotsquare/src/realm/entities/Score.js | 2 +- squarenotsquare/src/redux/actions/UserActions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/squarenotsquare/src/realm/entities/Score.js b/squarenotsquare/src/realm/entities/Score.js index 81425c2..449777e 100644 --- a/squarenotsquare/src/realm/entities/Score.js +++ b/squarenotsquare/src/realm/entities/Score.js @@ -4,6 +4,6 @@ export const ScoreEntity = { properties: { id: 'string', user: 'string', - value: 'string' + value: 'int' } }; \ No newline at end of file diff --git a/squarenotsquare/src/redux/actions/UserActions.js b/squarenotsquare/src/redux/actions/UserActions.js index 4bc9444..66d0c40 100644 --- a/squarenotsquare/src/redux/actions/UserActions.js +++ b/squarenotsquare/src/redux/actions/UserActions.js @@ -21,7 +21,7 @@ export function squareFinished(answers, finalTime) { newUser.lastGameAnswers = answers; let finalScore = calculateSquareScore(answers, finalTime); - DbAPI.createScore(userState.username, finalScore.toString()); + DbAPI.createScore(userState.username, finalScore); dispatch({ type: SQUARE_FINISHED, user: newUser