Created
October 20, 2016 05:50
-
-
Save dabit3/59f98f1221fdba4853178664e9c34744 to your computer and use it in GitHub Desktop.
Apollo Tutorial - Connector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PresidentModel = require('./model'); | |
class President { | |
constructor() { | |
this.findPresident = (name) => { | |
const person = PresidentModel.findOne({ name }, (error, data) => { | |
return data; | |
}); | |
return person; | |
}; | |
} | |
} | |
module.exports = { President }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment