{"size": 496, "ext": "js", "max_stars_repo_path": "src/apps/gateway/client/src/store/apiAxios.js", "max_stars_repo_name": "fortelabsinc/PlayerExchange", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/apps/gateway/client/src/store/apiAxios.js", "max_issues_repo_name": "fortelabsinc/PlayerExchange", "max_issues_repo_issues_event_min_datetime": "2020-04-28T20:39:12.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-27T03:54:44.000Z", "max_forks_repo_path": "src/apps/gateway/client/src/store/apiAxios.js", "max_forks_repo_name": "fortelabsinc/PlayerExchange", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 42, "max_forks_count": null, "avg_line_length": 22.5454545455, "max_line_length": 58, "alphanum_fraction": 0.6935483871}
import axios from 'axios'

// TODO: Move baseUrl var to .env
const apiAxios = axios.create({
  //baseURL: 'http://localhost:8181/portal/commands/v1',
  baseURL: '/portal/commands/v1',
  timeout: 60000,
  headers: {
    'Content-Type': 'application/json',
  },
})

export const setApiAuthToken = (token) => {
  apiAxios.defaults.headers.common['access-token'] = token
}

export const clearApiAuthToken = () => {
  apiAxios.defaults.headers.common['access-token'] = null
}

export default apiAxios
