{"size": 535, "ext": "js", "max_stars_repo_path": "comprobantefront/src/boot/axios.js", "max_stars_repo_name": "adimerpaul/comprobante", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "comprobantefront/src/boot/axios.js", "max_issues_repo_name": "adimerpaul/comprobante", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "comprobantefront/src/boot/axios.js", "max_forks_repo_name": "adimerpaul/comprobante", "max_forks_repo_forks_event_min_datetime": "2022-01-28T20:53:02.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-28T20:53:02.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 28.1578947368, "max_line_length": 81, "alphanum_fraction": 0.6803738318}
import Vue from 'vue'
import axios from 'axios'
import store from '../store'

Vue.prototype.$axios = axios
// Vue.prototype.$http = Axios;
const token = localStorage.getItem('tokencom')
if (token) {
  Vue.prototype.$axios.defaults.headers.common['Authorization'] = 'Bearer '+token
  Vue.prototype.$axios.post(process.env.URL+'/me').then(res=>{
    // console.log(res.data);
    // return false;
    // store.state.user=res.data;
    store.commit('auth_success', {token:token,user:res.data})
  })
}else{
  // store.dispatch('logout')
}
