Skip to content

Instantly share code, notes, and snippets.

@Marak
Forked from joshsmith/gist:1431472
Created December 4, 2011 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Marak/1431484 to your computer and use it in GitHub Desktop.
Save Marak/1431484 to your computer and use it in GitHub Desktop.
How should I be doing the callback?
user.save().on('success', handler).on('failure', handler)
function handler (result) {
if(result.err) { // or something like this
return callback(err);
}
return callback(null, result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment