mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-15 18:13:25 -06:00
fix API env base URL axios path with .env files
This commit is contained in:
@@ -45,7 +45,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getEpisode() {
|
||||
const path = `http://${process.env.VUE_APP_HOST}:${process.env.VUE_APP_FLASK_PORT}/api/episode/\
|
||||
const path = `${process.env.VUE_APP_BASE_APP_URL}/api/episode/\
|
||||
${this.$route.params.season}/${this.$route.params.episode}/`;
|
||||
axios.get(path)
|
||||
.then((res) => {
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getStats() {
|
||||
const path = `http://${process.env.VUE_APP_HOST}:${process.env.VUE_APP_FLASK_PORT}/api/stats/`;
|
||||
const path = `${process.env.VUE_APP_BASE_APP_URL}/api/stats/`;
|
||||
axios.get(path)
|
||||
.then((res) => {
|
||||
this.stats = res.data;
|
||||
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
}
|
||||
},
|
||||
fetchQuotes() {
|
||||
const path = `http://${process.env.VUE_APP_HOST}:${process.env.VUE_APP_FLASK_PORT}/api/quote_surround?season=\
|
||||
const path = `${process.env.VUE_APP_BASE_APP_URL}/api/quote_surround?season=\
|
||||
${this.item.season}&episode=${this.item.episode_rel}&scene=${this.item.section_rel}"e=${this.item.quote_rel}`;
|
||||
axios.get(path)
|
||||
.then((res) => {
|
||||
|
||||
@@ -151,7 +151,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getSeasons() {
|
||||
const path = `http://${process.env.VUE_APP_HOST}:${process.env.VUE_APP_FLASK_PORT}/api/episodes/`;
|
||||
const path = `${process.env.VUE_APP_BASE_APP_URL}/api/episodes/`;
|
||||
axios.get(path)
|
||||
.then((res) => {
|
||||
this.seasons = res.data;
|
||||
|
||||
Reference in New Issue
Block a user