Skip to content

Instantly share code, notes, and snippets.

@tbergeron
Created May 22, 2012 13:00
Show Gist options
  • Save tbergeron/2768898 to your computer and use it in GitHub Desktop.
Save tbergeron/2768898 to your computer and use it in GitHub Desktop.
// getByCode is now availaible from the client!
socket.on('getByCode', function (code, callback) {
getByCode(code, function(project){
callback(project);
})
});
// gets a project by its code
getByCode: function(code, callback) {
this.baseFindOne({ code: code }, function(project) {
return callback(project ? project : null);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment