Compare commits

..

1 Commits

Author SHA1 Message Date
123e95a313
provide config.js
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-28 21:54:23 +02:00
7 changed files with 9 additions and 9 deletions

View File

@ -1,3 +1,3 @@
window.ki = {
apiUrl: 'http://localhost:5000'
api_url: 'http://localhost:5000'
}

View File

@ -109,7 +109,7 @@ export default {
},
data() {
return {
iconUrl: this.apiUrl,
iconUrl: this.api_url,
searchText: "",
contactContent: "",
searchResults: [],
@ -122,7 +122,7 @@ export default {
async search() {
try {
const request = await this.axios.get(
`${this.apiUrl}/${this.type}s?search=${this.searchText}`,
`${this.api_url}/${this.type}s?search=${this.searchText}`,
{
headers: {
Authorization: `Bearer ${localStorage.getItem("token")}`,

View File

@ -59,7 +59,7 @@ export default {
},
data() {
return {
iconUrl: this.apiUrl
iconUrl: this.api_url
}
}
};

View File

@ -12,6 +12,6 @@ const app = createApp(App)
app.use(router)
app.config.globalProperties.axios=axios
app.config.globalProperties.apiUrl = window.ki.apiUrl
app.config.globalProperties.apiUrl = window.ki.api_url
app.mount('#app')

View File

@ -80,7 +80,7 @@ export default {
async submitSearch() {
this.showErrorMessage = false;
try {
let url = `${this.apiUrl}/users/profiles`;
let url = `${this.api_url}/users/profiles`;
if (this.searchText != "") {
url += `?nickname=${this.searchText}`;
}

View File

@ -182,7 +182,7 @@ export default {
async created() {
try {
const userProfile = await axios.get(
`${this.apiUrl}/users/${localStorage.getItem(
`${this.api_url}/users/${localStorage.getItem(
"user_id"
)}/profile`,
{
@ -198,7 +198,7 @@ export default {
async submitForm() {
try {
const formSubmitResult = await axios.post(
`${this.apiUrl}/users/${localStorage.getItem(
`${this.api_url}/users/${localStorage.getItem(
"user_id"
)}/profile`,
this.profile,

View File

@ -44,7 +44,7 @@ export default {
async created() {
try {
const userProfile = await this.axios.get(
`${this.apiUrl}/users/${this.$route.params.memberId}/profile`,
`${this.api_url}/users/${this.$route.params.memberId}/profile`,
{
headers: { Authorization: `Bearer ${localStorage.getItem("token")}` },
}