kopia lustrzana https://github.com/manuelkasper/sotlas-frontend
Make elevation API URL configurable via env var
rodzic
7e715070cc
commit
227afdb918
1
.env
1
.env
|
@ -2,3 +2,4 @@ VUE_APP_API_URL="https://api.sotl.as"
|
|||
VUE_APP_WSS_URL="wss://api.sotl.as"
|
||||
VUE_APP_PHOTOS_URL="https://photos.sotl.as"
|
||||
VUE_APP_PHOTOS_ORIGINAL_URL="https://sotlas-photos.s3.eu-central-003.backblazeb2.com/original"
|
||||
VUE_APP_ELEVATION_API_URL="https://ele.sotl.as/api"
|
||||
|
|
|
@ -103,7 +103,7 @@ export default {
|
|||
if (!this.latitude || !this.longitude || !this.showElevation) {
|
||||
return
|
||||
}
|
||||
axios.post('https://ele.sotl.as/api', [[this.latitude, this.longitude]])
|
||||
axios.post(process.env.VUE_APP_ELEVATION_API_URL, [[this.latitude, this.longitude]])
|
||||
.then(result => {
|
||||
this.elevation = Math.round(result.data[0])
|
||||
})
|
||||
|
|
|
@ -396,7 +396,7 @@ export default {
|
|||
}
|
||||
|
||||
this.loading = true
|
||||
axios.post('https://ele.sotl.as/api', eleCoordinates)
|
||||
axios.post(process.env.VUE_APP_ELEVATION_API_URL, eleCoordinates)
|
||||
.then(result => {
|
||||
this.chartData = result.data.map((elevation, i) => {
|
||||
return {
|
||||
|
|
Ładowanie…
Reference in New Issue