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 leadRepo = require('../lead/repository'); | |
let dto = { | |
email: req.body.email | |
}; | |
leadRepo.findByEmail(dto.email).then( (doc) => { | |
if(doc){ | |
res.status(200).end(); | |
} |
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
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 [email protected] | |
3 info using [email protected] | |
4 silly loadCurrentTree Starting | |
5 silly install loadCurrentTree | |
6 silly install readLocalPackageData |
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
// 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 | |
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
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); | |
} |