Skip to content

Commit

Permalink
feat: allow to search user by email in the gateway routes
Browse files Browse the repository at this point in the history
  • Loading branch information
jvedrson committed Jul 8, 2024
1 parent 2f29354 commit 11db52d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/routes/gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ module.exports = (Router, Service) => {
});
});

Router.post('/gateway/user/findByEmail', basicAuth, async (req, res) => {
const email = req.body.email.toLowerCase();
const user = await Service.User.FindUserByEmail(email).catch(() => null);
return res.status(200).send({ error: null, user });
});

Router.post('/gateway/register/stage', basicAuth, (req, res) => {
const { email } = req.body;
Service.User.CreateStaggingUser(email)
Expand Down

0 comments on commit 11db52d

Please sign in to comment.