Created
May 11, 2020 20:19
-
-
Save wendelnascimento/5b659cc8753abeddf7c357110934869c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
const user = await UserService.userMethod(req.body.code); | |
res.status(200).json(loggedUser); | |
} catch (e) { | |
res.status(e.status || 400).json({ | |
error: e.name, | |
message: e.message, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment