This commit is contained in:
lingdocs 2021-08-22 17:15:58 +04:00
parent 1e0bee2f07
commit 2aa24d19ee
1 changed files with 2 additions and 4 deletions

View File

@ -135,10 +135,8 @@ apiRouter.put("/user/upgrade", async (req, res, next) => {
apiRouter.delete("/user", async (req, res, next) => {
try {
if (!req.user) throw new Error("user not found");
await Promise.all([
deleteWordlistDatabase(req.user.userId),
deleteLingdocsUser(req.user.userId),
]);
await deleteWordlistDatabase(req.user.userId),
await deleteLingdocsUser(req.user.userId),
sendResponse(res, { ok: true, message: "user deleted" });
} catch (e) {
next(e);