const axios = require('axios');

async function getHubspotPipelines(token, ) {
  try {
    const config = {
      method: 'get',
      url: 'https://api.hubapi.com/crm/v3/pipelines/tickets',
      headers: { 
        'Authorization': `Bearer ${token}`,  
        "Content-Type": "application/json"
      }
    };

    const {data} = await axios(config);
    return data; 
  } catch (error) {
    console.error(error);
  }
}

module.exports = getHubspotPipelines