debug func
This commit is contained in:
parent
946a6c06e3
commit
4212b3b159
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue