import { AUTH_SERVICE } from 'config'
import { callApi } from 'helpers'

export type GeoInfoType = {
  city: string,
  country_code: string,
  time_zone: string,
}

export const getGeoInfo = async (): Promise<GeoInfoType> => {
  const config = {
    method: 'GET',
  }

  return callApi({
    config,
    url: `${AUTH_SERVICE}/geoinfo`,
  })
}
