import axios from 'axios'

function getShares () {
  const api = '/api/shares/NewSite/handler/IndexHandler.ashx'

  return new Promise((resolve, reject) => {
    axios.get(`${api}?v=${Math.random()}`).then((response) => {
      resolve(response.data)
    }).catch((err) => {
      window.console.error(err)
      reject(err.message)
    })
  })
}

export default getShares
