Compare commits
1 Commits
f2f99ac881
...
123e95a313
Author | SHA1 | Date | |
---|---|---|---|
123e95a313 |
@ -1,3 +1,3 @@
|
||||
window.ki = {
|
||||
apiUrl: 'http://localhost:5000'
|
||||
api_url: 'http://localhost:5000'
|
||||
}
|
||||
|
@ -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")}`,
|
||||
|
@ -59,7 +59,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
iconUrl: this.apiUrl
|
||||
iconUrl: this.api_url
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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')
|
||||
|
@ -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}`;
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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")}` },
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user