From 0858e1d4fe32b5d2cf1298fb9f2edbf612ade491 Mon Sep 17 00:00:00 2001 From: Rosanny Date: Wed, 4 Aug 2021 21:39:59 +0200 Subject: [PATCH] fixing bug MLAB-539 --- routes/public.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/routes/public.ts b/routes/public.ts index a5c7bd13..43b28e8a 100644 --- a/routes/public.ts +++ b/routes/public.ts @@ -92,6 +92,17 @@ export = function (app:any, config:any, lang:string) { ]) } }) + // to check whether or not an account is already exist + app.get('/email/:email', async function(req:any, res:any) { + let user = await methods.checkUserEmail(req.params.email) + if (!user) { + console.log('No user found: '+req.params.email) + res.send(true) + } else { + console.log('User found: '+req.params.email) + res.send(false) + } + }) // =================== USERS VERIFICATION ========================= -- GitLab