1
0

Use base URL for axios (#241)

* Switch site to use axios base url

* Fix team invites

* Fix find/replace setting the wrong thing

* Fix analytics being blocking, small issues
This commit is contained in:
Geometrically
2021-05-28 10:19:13 -07:00
committed by GitHub
parent 03cbab5267
commit 5017c5a5f1
25 changed files with 137 additions and 209 deletions

View File

@@ -102,8 +102,6 @@
</div>
</template>
<script>
import axios from 'axios'
import Multiselect from 'vue-multiselect'
export default {
@@ -144,7 +142,7 @@ export default {
if (!this.version.changelog && this.version.changelog_url) {
this.version.changelog = (
await axios.get(this.version.changelog_url)
await this.$axios.get(this.version.changelog_url)
).data
}
},
@@ -152,8 +150,8 @@ export default {
try {
const [selectableLoaders, selectableVersions] = (
await Promise.all([
axios.get(`https://api.modrinth.com/api/v1/tag/loader`),
axios.get(`https://api.modrinth.com/api/v1/tag/game_version`),
data.$axios.get(`tag/loader`),
data.$axios.get(`tag/game_version`),
])
).map((it) => it.data)
@@ -185,8 +183,8 @@ export default {
this.$nuxt.$loading.start()
try {
await axios.patch(
`https://api.modrinth.com/api/v1/version/${this.version.id}`,
await this.$axios.patch(
`version/${this.version.id}`,
this.version,
this.$auth.headers
)