diff --git a/account/src/lib/couch-db.ts b/account/src/lib/couch-db.ts index bfb6bc3..4d7866a 100644 --- a/account/src/lib/couch-db.ts +++ b/account/src/lib/couch-db.ts @@ -63,6 +63,7 @@ export async function insertLingdocsUser(user: T.LingdocsUser): Promise { const user = await getLingdocsUser("userId", uuid); + await deleteCouchDbAuthUser(uuid); if (!user) return; // TODO: cleanup userdbs etc // TODO: Better type certainty here... obviously there is an _id and _rev here diff --git a/account/src/lib/mail-utils.ts b/account/src/lib/mail-utils.ts index 9573dfb..82ca548 100644 --- a/account/src/lib/mail-utils.ts +++ b/account/src/lib/mail-utils.ts @@ -78,6 +78,5 @@ LingDocs Admin`; export async function sendUpgradeRequestToAdmin(userWantingToUpgrade: T.LingdocsUser) { const subject = "Account Upgrade Request"; const content = `${userWantingToUpgrade.name} - ${userWantingToUpgrade.email} - ${userWantingToUpgrade.userId} is requesting to upgrade to student.`; - console.log("sending notice of upgrade request to ", adminAddress); await sendEmail(adminAddress, subject, content); } \ No newline at end of file diff --git a/account/src/routers/api-router.ts b/account/src/routers/api-router.ts index f2cab33..134f413 100644 --- a/account/src/routers/api-router.ts +++ b/account/src/routers/api-router.ts @@ -161,8 +161,6 @@ apiRouter.post("/user/upgradeToStudentRequest", async (req, res, next) => { apiRouter.delete("/user", async (req, res, next) => { try { if (!req.user) throw new Error("user not found"); - // await deleteWordlistDatabase(req.user.userId); - await deleteCouchDbAuthUser(req.user.userId); await deleteLingdocsUser(req.user.userId); sendResponse(res, { ok: true, message: "user deleted" }); } catch (e) {