debugging
This commit is contained in:
parent
e581005d21
commit
30b500230a
|
@ -49,6 +49,7 @@ export async function getAllLingdocsUsers(): Promise<T.LingdocsUser[]> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function insertLingdocsUser(user: T.LingdocsUser): Promise<T.LingdocsUser> {
|
export async function insertLingdocsUser(user: T.LingdocsUser): Promise<T.LingdocsUser> {
|
||||||
|
console.log("coming to insert this user", user);
|
||||||
const res = await usersDb.insert(user);
|
const res = await usersDb.insert(user);
|
||||||
const newUser = processAPIResponse(user, res);
|
const newUser = processAPIResponse(user, res);
|
||||||
if (!newUser) {
|
if (!newUser) {
|
||||||
|
|
|
@ -51,6 +51,7 @@ apiRouter.put("/user/tests", async (req, res, next) => {
|
||||||
if (!req.user) return next("user not found");
|
if (!req.user) return next("user not found");
|
||||||
try {
|
try {
|
||||||
const { tests } = req.body as T.PostTestResultsBody;
|
const { tests } = req.body as T.PostTestResultsBody;
|
||||||
|
console.log("will update with", tests);
|
||||||
await updateLingdocsUser(req.user.userId, { tests });
|
await updateLingdocsUser(req.user.userId, { tests });
|
||||||
sendResponse(res, {
|
sendResponse(res, {
|
||||||
ok: true,
|
ok: true,
|
||||||
|
|
Loading…
Reference in New Issue