mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 03:39:16 +02:00
Fix #490: Ensure we always have a default api url set on first load to avoid displaying the instance picker
This commit is contained in:
parent
14774f393c
commit
5e7985387e
4 changed files with 9 additions and 7 deletions
|
@ -124,12 +124,13 @@ export default {
|
|||
// used to redraw ago dates every minute
|
||||
self.$store.commit('ui/computeLastDate')
|
||||
}, 1000 * 60)
|
||||
if (this.$store.state.instance.instanceUrl) {
|
||||
this.$store.commit('instance/instanceUrl', this.$store.state.instance.instanceUrl)
|
||||
this.$store.dispatch('auth/check')
|
||||
this.$store.dispatch('instance/fetchSettings')
|
||||
this.fetchNodeInfo()
|
||||
if (!this.$store.state.instance.instanceUrl) {
|
||||
let defaultInstanceUrl = process.env.VUE_APP_INSTANCE_URL || this.$store.getters['instance/defaultUrl']()
|
||||
this.$store.commit('instance/instanceUrl', defaultInstanceUrl)
|
||||
}
|
||||
this.$store.dispatch('auth/check')
|
||||
this.$store.dispatch('instance/fetchSettings')
|
||||
this.fetchNodeInfo()
|
||||
},
|
||||
methods: {
|
||||
fetchNodeInfo () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue