debug func

This commit is contained in:
lingdocs 2021-09-21 13:17:15 -04:00
parent 946a6c06e3
commit 4212b3b159
3 changed files with 4 additions and 4 deletions

View File

@ -52,9 +52,7 @@ apiRouter.put("/user/tests", async (req, res, next) => {
if (!req.user) return next("user not found");
try {
const { tests } = req.body as T.PostTestResultsBody;
console.log("will add tests to user");
await updateLingdocsUser(req.user.userId, { tests });
console.log("successful update of tests", JSON.stringify(tests));
return {
ok: true,
message: "posted test results",

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/lingdocs-main",
"version": "0.1.3",
"version": "0.1.4",
"description": "types and functions for lingdocs stuff",
"main": "dist/library.js",
"module": "dist/library.js",

View File

@ -36,7 +36,9 @@ export async function updateUserTextOptionsRecord(userTextOptionsRecord: AT.User
}
export async function postTestResults(tests: AT.TestResult[]): Promise<AT.PostTestResultsResponse> {
return await myFetch("account", "user/tests", "PUT", { tests }) as AT.PostTestResultsResponse;
const response = await myFetch("account", "user/tests", "PUT", { tests }) as AT.PostTestResultsResponse;
console.log("response from posting test results", response);
return response;
}
export async function signOut() {