Skip to content
Snippets Groups Projects
Commit fafcd360 authored by Alexandru Munteanu's avatar Alexandru Munteanu
Browse files

Merge branch 'refactor-component-invite' of...

Merge branch 'refactor-component-invite' of gitlab.coko.foundation:xpub/xpub-faraday into refactor-component-invite
parents 1e8f5403 e3d4ecad
No related branches found
No related tags found
1 merge request!5Refactor component invite
...@@ -29,7 +29,7 @@ module.exports = { ...@@ -29,7 +29,7 @@ module.exports = {
setupNewUserEmail: async (req, res, email, role, UserModel) => { setupNewUserEmail: async (req, res, email, role, UserModel) => {
let user let user
try { try {
user = UserModel.findByEmail(email) user = await UserModel.findByEmail(email)
} catch (e) { } catch (e) {
const notFoundError = await helpers.handleNotFoundError(e, 'user') const notFoundError = await helpers.handleNotFoundError(e, 'user')
return res.status(notFoundError.status).json({ return res.status(notFoundError.status).json({
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment