Last active
July 25, 2016 09:40
-
-
Save wgottschalk-RMS/2f8f8ada5df0a1da34c5d21505b492e5 to your computer and use it in GitHub Desktop.
This file contains 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
app.post("/purchase", async function (req, res) { | |
const userData = await user.findOneAsync(req.body); | |
const permissions = await permissions.findAllAsync(userData); | |
if (isAllowed(permissions)) { | |
const confirmNum = await transaction.processAsync(userData); | |
res.send("Your purchase was successful!") | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment