Allow the usage of a different instance for authentication.

This commit is contained in:
Kavin
2022-07-21 09:34:57 +05:30
parent 7803732da6
commit 37512b4e77
13 changed files with 65 additions and 30 deletions

View File

@@ -38,7 +38,7 @@ export default {
},
methods: {
fetchPlaylists() {
this.fetchJson(this.apiUrl() + "/user/playlists", null, {
this.fetchJson(this.authApiUrl() + "/user/playlists", null, {
headers: {
Authorization: this.getAuthToken(),
},
@@ -48,7 +48,7 @@ export default {
},
deletePlaylist(id) {
if (confirm(this.$t("actions.delete_playlist_confirm")))
this.fetchJson(this.apiUrl() + "/user/playlists/delete", null, {
this.fetchJson(this.authApiUrl() + "/user/playlists/delete", null, {
method: "POST",
body: JSON.stringify({
playlistId: id,
@@ -65,7 +65,7 @@ export default {
createPlaylist() {
const name = prompt(this.$t("actions.create_playlist"));
if (name)
this.fetchJson(this.apiUrl() + "/user/playlists/create", null, {
this.fetchJson(this.authApiUrl() + "/user/playlists/create", null, {
method: "POST",
body: JSON.stringify({
name: name,