Skip to content

Instantly share code, notes, and snippets.

@wildan3105
Created June 23, 2018 06:29
Show Gist options
  • Save wildan3105/13af299095ae7fcd3734a180a9b3fe7c to your computer and use it in GitHub Desktop.
Save wildan3105/13af299095ae7fcd3734a180a9b3fe7c to your computer and use it in GitHub Desktop.
module.exports = {
getAllStudents: function(cb){
Std.find({}, cb)
},
getStudentByNIM: function(nim, cb){
Std.find({nim:nim}, function(err, student){
cb(null, student[0])
})
},
getStudentByLink: function(link, cb){
Std.find({activation_link:link}, function(err, student){
cb(null, student[0])
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment