|
|
@@ -3,6 +3,11 @@ import axios from "axios";
|
|
|
export default class {
|
|
|
constructor(vuex) {
|
|
|
this.vuex = vuex
|
|
|
+ if(process.env.NODE_ENV !== 'production') {
|
|
|
+ this.api = 'http://localhost:8081'
|
|
|
+ } else {
|
|
|
+ this.api = 'https://live.ecconia.de'
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
commit(method, data)
|
|
|
@@ -13,7 +18,7 @@ export default class {
|
|
|
post(path, data)
|
|
|
{
|
|
|
return axios
|
|
|
- .post('https://live.ecconia.de' + path, data)
|
|
|
+ .post(this.api + path, data)
|
|
|
.catch((error) => {
|
|
|
console.error('Error: ', error)
|
|
|
})
|
|
|
@@ -22,7 +27,7 @@ export default class {
|
|
|
get(path)
|
|
|
{
|
|
|
return axios
|
|
|
- .get('https://live.ecconia.de' + path)
|
|
|
+ .get(this.api + path)
|
|
|
.catch((error) => {
|
|
|
console.error('Error: ', error)
|
|
|
})
|