This commit is contained in:
Denise_Datinguinoo committed 2026-08-20 12:49:12 +02:00
1 parent 00553e77fb
commit d037acaa15
5 files changed
+111 -59

No files matched your search

+20 -2
View File
@@ -8,7 +8,7 @@ const app = express();
const port = 3000;
app.use(express.json());
//var server = app.listen(3000, () => { console.log('Please your hubspot instance and next click on http://localhost:3000/install or http://localhost:3000/renew') })
//app.listen(3000, () => { console.log('Please your hubspot instance and next click on http://localhost:3000/install or http://localhost:3000/renew') })
// used to initiate the authorization flow to connect the app with Hubspot
app.get('/install', async (req, res) => {
@@ -611,8 +611,26 @@ var hubspot = {
console.error(`Error searching ${objectType}:`, e.response?.data);
throw e;
}
},
newCache: function(maxrecords=100) {
return {
records:[],
maxrecords:maxrecords,
add: function(record) {
this.records.push(record);
if (this.maxrecords>= this.records.length) return false;
return true;
},
isEmpty: function() { return (this.records.length==0); },
content: function() { return this.records; },
reset: function() { this.records=[]; }
}
}
};
module.exports = hubspot;