postpone the .env problem
This commit is contained in:
parent
b911b38074
commit
c6c98d6aa0
2 changed files with 7 additions and 8 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -22,3 +22,5 @@ yarn.lock
|
|||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
src/store/auth.js
|
|
@ -4,8 +4,11 @@ import axios from 'axios';
|
|||
//import * as _ from 'lodash/fp';
|
||||
import router from '../router';
|
||||
|
||||
import getAuth from './auth';
|
||||
|
||||
Vue.use(Vuex);
|
||||
|
||||
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
events: Array,
|
||||
|
@ -34,10 +37,7 @@ const store = new Vuex.Store({
|
|||
actions: {
|
||||
async loadEvents({ commit }) {
|
||||
const resp = await axios.get('https://c3lf.de/api/1/events', {
|
||||
auth: {
|
||||
username: process.env.VUE_APP_CONFIG_API_USER,
|
||||
password: process.env.VUE_APP_CONFIG_API_PASSWORD
|
||||
}
|
||||
auth: getAuth(),
|
||||
});
|
||||
|
||||
commit('replaceEvents', resp.data);
|
||||
|
@ -48,10 +48,7 @@ const store = new Vuex.Store({
|
|||
},
|
||||
async loadEventItems({ commit, state }) {
|
||||
const resp = await axios.get(`https://c3lf.de/api/1/${state.route.params.event}/items`, {
|
||||
auth: {
|
||||
username: process.env.VUE_APP_CONFIG_API_USER,
|
||||
password: process.env.VUE_APP_CONFIG_API_PASSWORD
|
||||
}
|
||||
auth: getAuth(),
|
||||
});
|
||||
|
||||
console.log(resp.data);
|
||||
|
|
Loading…
Reference in a new issue