const Company = require("../models/Company") async function getIntegrationsConfig(companyId, name) { const company = await Company.findOne({ companyId }) if (company){ let obj = company.integrations.find(i => i.name === name) return obj?.config } } module.exports = getIntegrationsConfig