Skip to content

Commit 5151585

Browse files
committed
feat: fix env BASE_URL and axios
1 parent 61945e3 commit 5151585

4 files changed

Lines changed: 5 additions & 14 deletions

File tree

.github/workflows/cd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525

2626
- name: Generate
2727
run: yarn generate
28+
env:
29+
BASE_URL: https://kfu-reg.github.io/database/
2830

2931
- name: Deploy
3032
uses: peaceiris/actions-gh-pages@v3

components/ClassesCalendar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function time(today, range, i) {
6161
)
6262
}
6363
</script>
64-
<style>
64+
<style scoped>
6565
.v-calendar-daily__scroll-area {
6666
overflow-y: auto;
6767
}

nuxt.config.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,7 @@ export default {
5050
// Axios module configuration: https://go.nuxtjs.dev/config-axios
5151
axios: {
5252
// Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
53-
baseURL: '/',
54-
},
55-
publicRuntimeConfig: {
56-
axios: {
57-
browserBaseURL: 'https://kfu-reg.github.io/database/',
58-
},
59-
},
60-
61-
privateRuntimeConfig: {
62-
axios: {
63-
baseURL: process.env.BASE_URL,
64-
},
53+
baseURL: process.env.BASE_URL || '/',
6554
},
6655

6756
// PWA module configuration: https://go.nuxtjs.dev/pwa

pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default {
9393
let url = `/CP/${this.selectedDepartment}/${this.selectedMajor}.json`
9494
this.loadingClasses = true
9595
try {
96-
const response = await axios.get(url)
96+
const response = await this.$axios.get(url)
9797
this.rawClasses = response.data
9898
this.loadingClasses = false
9999
} catch (error) {

0 commit comments

Comments
 (0)