From c371fe36452d66c630848eda41603b9e82ea8682 Mon Sep 17 00:00:00 2001 From: Eliot Berriot <contact@eliotberriot.com> Date: Sun, 24 Jun 2018 14:34:27 +0200 Subject: [PATCH] Fixed random stuff (redirection and broken absoluteURl) --- front/src/store/instance.js | 3 +++ front/src/views/playlists/Detail.vue | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/front/src/store/instance.js b/front/src/store/instance.js index dfd6a9db..95de9417 100644 --- a/front/src/store/instance.js +++ b/front/src/store/instance.js @@ -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 } }, diff --git a/front/src/views/playlists/Detail.vue b/front/src/views/playlists/Detail.vue index 61968c2e..7a378fa6 100644 --- a/front/src/views/playlists/Detail.vue +++ b/front/src/views/playlists/Detail.vue @@ -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 -- GitLab