Skip to content

Instantly share code, notes, and snippets.

@wgottschalk-RMS
Last active July 25, 2016 09:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wgottschalk-RMS/2f8f8ada5df0a1da34c5d21505b492e5 to your computer and use it in GitHub Desktop.
Save wgottschalk-RMS/2f8f8ada5df0a1da34c5d21505b492e5 to your computer and use it in GitHub Desktop.
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