const axios = require('axios')

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

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

module.exports = getHubspotTicketStatus



