USER_API in quasar.conf

This commit is contained in:
Timo Volkmann 2019-04-30 17:59:13 +02:00
parent a9450d448f
commit a97b3f1c91
4 changed files with 14 additions and 7 deletions

View File

@ -110,10 +110,12 @@ module.exports = function (ctx) {
env: ctx.dev
? { // Base URL for API-Calls: DEV
//API: JSON.stringify('http://localhost:8080')
API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19geocaching')
API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19geocaching'),
USER_API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19usermanagement')
}
: { // Base URL for API-Calls: PRODUCTION (build)
API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19geocaching')
API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19geocaching'),
USER_API: JSON.stringify('https://seserver.se.hs-heilbronn.de:8443/buga19usermanagement')
//API: JSON.stringify('http://localhost:8080')
}
},

View File

@ -96,7 +96,7 @@
console.log("GET /api/login/ - json: " + JSON.stringify(data));
this.$axios.post('https://seserver.se.hs-heilbronn.de:8443/buga19usermanagement/account/login', data)
this.$axios.post(process.env.USER_API+'/account/login', data)
.then((response) => {
console.log("GET/POST /api/login/ - response: ");
console.log(response.data);

View File

@ -110,7 +110,7 @@
console.log("POST /api/register/ - json: " + JSON.stringify(data));
const token = JSON.parse(localStorage.getItem('registerToken')).token;
this.$axios.post('http://www.se.hs-heilbronn.de:9080/buga19usermanagement/account/register', data,{
this.$axios.post(process.env.USER_API+'/account/register', data,{
headers: {
'Authorization': 'Bearer ' + token,
}
@ -167,7 +167,7 @@
console.log("GET /api/login/ - json: " + JSON.stringify(logindata));
this.$axios.post('http://www.se.hs-heilbronn.de:9080/buga19usermanagement/account/login', logindata)
this.$axios.post(process.env.USER_API+'/account/login', logindata)
.then((response) => {
localStorage.setItem('registerToken', JSON.stringify(response.data));
})

View File

@ -35,13 +35,18 @@ export const RESET_NEW_CACHE = (state) => {
name: "",
description: "",
rankingPoints: 0,
reward: {
rewardDescription: "",
},
stationen: []
};
state.endStation = {
description: "Endstation",
longitude: 0.0001,
lattitude: 0.0001,
longitude: 9.206628,
lattitude: 49.147734,
solution: "",
};
console.log("resetted new Cache");
};
export const LOAD_REMOTE_CACHE = (state, id) => {