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

@@ -39,7 +39,7 @@ export default {
},
mounted() {
if (this.authenticated)
this.fetchJson(this.apiUrl() + "/subscriptions", null, {
this.fetchJson(this.authApiUrl() + "/subscriptions", null, {
headers: {
Authorization: this.getAuthToken(),
},
@@ -54,7 +54,7 @@ export default {
},
methods: {
handleButton(subscription) {
this.fetchJson(this.apiUrl() + (subscription.subscribed ? "/unsubscribe" : "/subscribe"), null, {
this.fetchJson(this.authApiUrl() + (subscription.subscribed ? "/unsubscribe" : "/subscribe"), null, {
method: "POST",
body: JSON.stringify({
channelId: subscription.url.split("/")[2],