From 85752324549c298d78a020dd7839f3a63a6e5742 Mon Sep 17 00:00:00 2001 From: Alexander Polynomdivision Date: Fri, 19 Oct 2018 17:11:53 +0200 Subject: [PATCH] docs: Remove commented code --- backend/src/api/user.ts | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/backend/src/api/user.ts b/backend/src/api/user.ts index 43959c4..a4cdc4b 100644 --- a/backend/src/api/user.ts +++ b/backend/src/api/user.ts @@ -310,33 +310,6 @@ userRouter.post("/level/:id", async (req: LRequest, res) => { // Nothing } else { // The level is new to the user - // Is the new level higher than the "highest" already completed level? - // let update = { - // levels: user.levels.concat(id), - // }; - // if (id > Math.max(...user.levels)) { - // // TODO: if (!level) - // const level = await db.collection("levels").findOne({ - // level: id, - // }); - - // // Convert the level's vocabulary to SM2 metadata - // let sm2: { [id: number]: ISchedulingData } = {}; - // level.vocab.forEach((id: number) => { - // sm2[id] = { - // easiness: 1.3, - // consecutiveCorrectAnswers: 0, - // nextDueDate: Date.parse((new Date()).toString()), - // }; - // }); - // const newVocabMetadata = Object.assign({}, user.vocabMetadata, sm2); - - // // Also update the lastLevel attribute - // Object.assign(update, { - // lastLevel: id, - // vocabMetadata: newVocabMetadata, - // }); - // } await db.collection("users").updateOne({ username: user.username, }, {