Skip to content

Instantly share code, notes, and snippets.

View alexandremaeda's full-sized avatar
🏠
Working from home

Alexandre Maeda alexandremaeda

🏠
Working from home
View GitHub Profile
const leadRepo = require('../lead/repository');
let dto = {
email: req.body.email
};
leadRepo.findByEmail(dto.email).then( (doc) => {
if(doc){
res.status(200).end();
}
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Alexandre\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'hummus' ]
2 info using npm@3.3.9
3 info using node@v4.4.7
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
// repository
const repository = {
findByUserID: (userID) => Simulator.findOne({ user: userID }).exec()
};
// controller
const getModulesAmount = (req, res) => {
var valueMonth = req.param('valueMonth');
var modules = 5; // create a flag
function (formID, email, origin, callback) {
request.post({ url:'https://api.convertkit.com/v3/forms/'+formID+'/subscribe', form: {api_key: this.API_KEY, email: email, fields: {origem: origin}, tags: 74911}}, callback);
}