docs: Remove TODOs
This commit is contained in:
parent
857eea777f
commit
f22008784c
@ -63,7 +63,6 @@ userRouter.get("/logout", async (req: LRequest, res) => {
|
|||||||
userRouter.get("/vocab", async (req: LRequest, res) => {
|
userRouter.get("/vocab", async (req: LRequest, res) => {
|
||||||
// Get the user
|
// Get the user
|
||||||
const { db, token } = req;
|
const { db, token } = req;
|
||||||
// TODO: if (!user)
|
|
||||||
const user = await userFromSession(token, db);
|
const user = await userFromSession(token, db);
|
||||||
|
|
||||||
const { vocabMetadata } = await db.collection("users").findOne({
|
const { vocabMetadata } = await db.collection("users").findOne({
|
||||||
@ -105,7 +104,6 @@ export enum VocabType {
|
|||||||
|
|
||||||
// Gets the user's review queue
|
// Gets the user's review queue
|
||||||
userRouter.get("/queue", async (req: LRequest, res) => {
|
userRouter.get("/queue", async (req: LRequest, res) => {
|
||||||
// TODO: if (user)
|
|
||||||
const { token, db } = req;
|
const { token, db } = req;
|
||||||
let user = Object.assign({}, await userFromSession(token, db));
|
let user = Object.assign({}, await userFromSession(token, db));
|
||||||
|
|
||||||
@ -152,7 +150,6 @@ userRouter.get("/queue", async (req: LRequest, res) => {
|
|||||||
|
|
||||||
// Get ot set the last review results
|
// Get ot set the last review results
|
||||||
userRouter.get("/lastReview", async (req: LRequest, res) => {
|
userRouter.get("/lastReview", async (req: LRequest, res) => {
|
||||||
// TODO: if(user)
|
|
||||||
const { token, db } = req;
|
const { token, db } = req;
|
||||||
const user = await userFromSession(token, db);
|
const user = await userFromSession(token, db);
|
||||||
|
|
||||||
@ -230,7 +227,6 @@ userRouter.post("/lastReview", async (req: LRequest, res) => {
|
|||||||
// Returns the next level (level + 1) or the current level, if no higher level
|
// Returns the next level (level + 1) or the current level, if no higher level
|
||||||
// can be found
|
// can be found
|
||||||
async function getNextLevel(token: string, db: Db): Promise<any> {
|
async function getNextLevel(token: string, db: Db): Promise<any> {
|
||||||
// TODO: if(user)
|
|
||||||
const user = await userFromSession(token, db);
|
const user = await userFromSession(token, db);
|
||||||
const { lastLevel } = user;
|
const { lastLevel } = user;
|
||||||
|
|
||||||
@ -282,7 +278,6 @@ userRouter.post("/level/:id", async (req: LRequest, res) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: if (user)
|
|
||||||
const { token, db } = req;
|
const { token, db } = req;
|
||||||
const user = await userFromSession(token, db);
|
const user = await userFromSession(token, db);
|
||||||
|
|
||||||
@ -335,7 +330,6 @@ userRouter.get("/dashboard", async (req: LRequest, res) => {
|
|||||||
const { db, token } = req;
|
const { db, token } = req;
|
||||||
|
|
||||||
// Get the user
|
// Get the user
|
||||||
// TODO: if (user)
|
|
||||||
const user = await userFromSession(token, db);
|
const user = await userFromSession(token, db);
|
||||||
const { classId } = user;
|
const { classId } = user;
|
||||||
|
|
||||||
@ -386,7 +380,6 @@ userRouter.post("/showWelcome", async (req: LRequest, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find the user
|
// Find the user
|
||||||
// TODO: if (user)
|
|
||||||
const user = await userFromSession(token, db);
|
const user = await userFromSession(token, db);
|
||||||
|
|
||||||
await db.collection("users").updateOne({
|
await db.collection("users").updateOne({
|
||||||
@ -416,7 +409,6 @@ userRouter.post("/score", async (req: LRequest, res) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: if (user)
|
|
||||||
const user = await userFromSession(token, db);
|
const user = await userFromSession(token, db);
|
||||||
// Update the score
|
// Update the score
|
||||||
db.collection("users").updateOne({
|
db.collection("users").updateOne({
|
||||||
|
@ -258,7 +258,6 @@ const password = encodeURIComponent(env["LATEINICUS_USER_PW"]);
|
|||||||
error: "200",
|
error: "200",
|
||||||
data: userData,
|
data: userData,
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log("Could not resolve login promise!", err);
|
console.log("Could not resolve login promise!", err);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user