From 36b78a94e2720800a4676e12498e876727d8ca6a Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Sat, 18 Sep 2021 23:14:36 -0400 Subject: [PATCH] try posting test results --- package.json | 2 +- src/games/GameCore.tsx | 5 ++++- yarn.lock | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index b4f8ea0..1d57edf 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "@fortawesome/fontawesome-free": "^5.15.2", - "@lingdocs/lingdocs-main": "^0.1.1", + "@lingdocs/lingdocs-main": "^0.1.2", "@lingdocs/pashto-inflector": "^1.0.5", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", diff --git a/src/games/GameCore.tsx b/src/games/GameCore.tsx index f8f2f18..a77d371 100644 --- a/src/games/GameCore.tsx +++ b/src/games/GameCore.tsx @@ -10,6 +10,7 @@ import { import { AT, getTimestamp, + postTestResults, } from "@lingdocs/lingdocs-main"; import { Types as T, @@ -55,8 +56,10 @@ function GameCore({ questions, Display, timeLimit, Instructions, studyLink, i time: getTimestamp(), id, }; - // TODO: post results console.log("will post result", JSON.stringify(result)); + postTestResults([result]) + .then(console.log) + .catch(console.error); } } function handleQuit() { diff --git a/yarn.lock b/yarn.lock index 4ae06ce..10be111 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1566,10 +1566,10 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@lingdocs/lingdocs-main@^0.1.1": - version "0.1.1" - resolved "https://npm.lingdocs.com/@lingdocs%2flingdocs-main/-/lingdocs-main-0.1.1.tgz#b4b7b8774821e5188a8deb7312cd2db0410115d1" - integrity sha512-Khh1bZ2ZB9BowB1Thp38hrJnHyVQfeQBFFYV1Juc0YLsGInCAAptI4QGSOL1PXRGhYIwQwrgu+1J/dFyDO/6CA== +"@lingdocs/lingdocs-main@^0.1.2": + version "0.1.2" + resolved "https://npm.lingdocs.com/@lingdocs%2flingdocs-main/-/lingdocs-main-0.1.2.tgz#3b56cd272e696c335de4dad1ccff11805970e312" + integrity sha512-8F3bAahYGZv7qJjVwDxs0IK3k92CuW0aJGJvINipSLFRdd+u5BxvxdiGgYnfocPhHO+rQsOKVskTK1+v5boctA== dependencies: nano "^9.0.5" passport-github2 "^0.1.12"