Fixed random stuff (redirection and broken absoluteURl)

This commit is contained in:
Eliot Berriot 2018-06-24 14:34:27 +02:00
parent 697ea24b79
commit c371fe3645
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
2 changed files with 4 additions and 1 deletions

View File

@ -71,6 +71,9 @@ export default {
if (relativeUrl.startsWith('http')) {
return relativeUrl
}
if (state.instanceUrl.endsWith('/') && relativeUrl.startsWith('/')) {
relativeUrl = relativeUrl.slice(1)
}
return state.instanceUrl + relativeUrl
}
},

View File

@ -93,7 +93,7 @@ export default {
let url = 'playlists/' + this.id + '/'
axios.get(url).then((response) => {
self.playlist = response.data
axios.get(url + 'tracks').then((response) => {
axios.get(url + 'tracks/').then((response) => {
self.updatePlts(response.data.results)
}).then(() => {
self.isLoading = false