import axios from 'axios'

const url = `${location.protocol}//update-fengchao.apps.xiaoyun.com/release`

const downloadUrl = {
  mac: `${url}/latest-mac.json`,
  windows: `${url}/latest.yml`
}

export function getMacDownloadUrl () {
  return axios.get(downloadUrl.mac).then((res) => {
    return Promise.resolve(res.data)
  })
}
export function getWindowsDownloadUrl () {
  return axios.get(downloadUrl.windows).then((res) => {
    return Promise.resolve(res.data)
  })
}
