Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const agileCrm = require('agile_crm');
- let aCrm = new agileCrm(process.env.AGILE_DOMAIN, process.env.AGILE_APIKEY, process.env.AGILE_EMAIL + '@broader.com.au');
- module.exports = function () {
- aCrm.contactAPI.getCompaniesByPropertyFilter('Type', 'School', success, error);
- };
- var success = function (data) {
- console.log('returning obj');
- return(resultObj);
- };
- var error = function (data) {
- console.log(data);
- };
- ...
- const getSchoolsFromAgile = require('./getSchoolsFromAgile.js');
- ...
- app.get('/schools', function(req, res) {
- console.log('sending res');
- res.send(getSchoolsFromAgile());
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement