Skip to content

Instantly share code, notes, and snippets.

@wgottschalk-RMS
Created June 27, 2016 00:44
Show Gist options
  • Save wgottschalk-RMS/7788e64ef1217e69ab4a6f17925adaf1 to your computer and use it in GitHub Desktop.
Save wgottschalk-RMS/7788e64ef1217e69ab4a6f17925adaf1 to your computer and use it in GitHub Desktop.
user.findOne({name: "Will"}, (err, user) => {
if (err) return handleError(err);
permissions.findAll({id: user.id}, (err2, permissions) => {
if (err2) return handleError(err2);
if (isAllowed(permissions)) {
transaction.process(user, (err3, confirmNum) => {
if (err3) handleError(err3);
res.send("Your transaction was successful!)
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment