forked from kompetenzinventar/ki-frontend
provide config.js
This commit is contained in:
@ -107,4 +107,4 @@ export default {
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
@ -109,7 +109,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
iconUrl: process.env.VUE_APP_API_URL,
|
||||
iconUrl: this.apiUrl,
|
||||
searchText: "",
|
||||
contactContent: "",
|
||||
searchResults: [],
|
||||
@ -122,7 +122,7 @@ export default {
|
||||
async search() {
|
||||
try {
|
||||
const request = await this.axios.get(
|
||||
`${process.env.VUE_APP_API_URL}/${this.type}s?search=${this.searchText}`,
|
||||
`${this.apiUrl}/${this.type}s?search=${this.searchText}`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${localStorage.getItem("token")}`,
|
||||
@ -204,4 +204,4 @@ export default {
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
@ -59,8 +59,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
iconUrl: process.env.VUE_APP_API_URL
|
||||
iconUrl: this.apiUrl
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { createApp } from 'vue/dist/vue.esm-bundler';
|
||||
import { createApp } from 'vue/dist/vue.esm-bundler'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
|
||||
@ -12,10 +12,6 @@ const app = createApp(App)
|
||||
app.use(router)
|
||||
|
||||
app.config.globalProperties.axios=axios
|
||||
|
||||
app.config.globalProperties.apiUrl= (process.env.VUE_APP_API_URL ? process.env.VUE_APP_API_URL : '')
|
||||
app.config.globalProperties.apiUrl = window.ki.apiUrl
|
||||
|
||||
app.mount('#app')
|
||||
|
||||
|
||||
|
||||
|
@ -80,7 +80,7 @@ export default {
|
||||
async submitSearch() {
|
||||
this.showErrorMessage = false;
|
||||
try {
|
||||
let url = `${process.env.VUE_APP_API_URL}/users/profiles`;
|
||||
let url = `${this.apiUrl}/users/profiles`;
|
||||
if (this.searchText != "") {
|
||||
url += `?nickname=${this.searchText}`;
|
||||
}
|
||||
@ -98,4 +98,4 @@ export default {
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
@ -127,7 +127,7 @@
|
||||
v-model="profile.address.country"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-outline-success mb-4 mt-4 col-12">Speichern</button>
|
||||
<div
|
||||
@ -182,7 +182,7 @@ export default {
|
||||
async created() {
|
||||
try {
|
||||
const userProfile = await axios.get(
|
||||
`${process.env.VUE_APP_API_URL}/users/${localStorage.getItem(
|
||||
`${this.apiUrl}/users/${localStorage.getItem(
|
||||
"user_id"
|
||||
)}/profile`,
|
||||
{
|
||||
@ -198,7 +198,7 @@ export default {
|
||||
async submitForm() {
|
||||
try {
|
||||
const formSubmitResult = await axios.post(
|
||||
`${process.env.VUE_APP_API_URL}/users/${localStorage.getItem(
|
||||
`${this.apiUrl}/users/${localStorage.getItem(
|
||||
"user_id"
|
||||
)}/profile`,
|
||||
this.profile,
|
||||
@ -222,4 +222,4 @@ export default {
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
@ -44,7 +44,7 @@ export default {
|
||||
async created() {
|
||||
try {
|
||||
const userProfile = await this.axios.get(
|
||||
`${process.env.VUE_APP_API_URL}/users/${this.$route.params.memberId}/profile`,
|
||||
`${this.apiUrl}/users/${this.$route.params.memberId}/profile`,
|
||||
{
|
||||
headers: { Authorization: `Bearer ${localStorage.getItem("token")}` },
|
||||
}
|
||||
@ -55,4 +55,4 @@ export default {
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user