mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Allow loading large amount of unauth subscriptions through POST method.
This commit is contained in:
parent
b6a78a7be3
commit
f2679c4813
2 changed files with 24 additions and 6 deletions
|
@ -124,9 +124,18 @@ export default {
|
|||
authToken: this.getAuthToken(),
|
||||
});
|
||||
} else {
|
||||
return await this.fetchJson(this.authApiUrl() + "/feed/unauthenticated", {
|
||||
channels: this.getUnauthenticatedChannels(),
|
||||
});
|
||||
const channels = this.getUnauthenticatedChannels();
|
||||
const split = channels.split(",");
|
||||
if (split.length > 100) {
|
||||
return await this.fetchJson(this.authApiUrl() + "/feed/unauthenticated", null, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(split),
|
||||
});
|
||||
} else {
|
||||
return await this.fetchJson(this.authApiUrl() + "/feed/unauthenticated", {
|
||||
channels: channels,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
async loadChannelGroups() {
|
||||
|
|
|
@ -167,9 +167,18 @@ export default {
|
|||
},
|
||||
});
|
||||
} else {
|
||||
return await this.fetchJson(this.authApiUrl() + "/subscriptions/unauthenticated", {
|
||||
channels: this.getUnauthenticatedChannels(),
|
||||
});
|
||||
const channels = this.getUnauthenticatedChannels();
|
||||
const split = channels.split(",");
|
||||
if (split.length > 100) {
|
||||
return await this.fetchJson(this.authApiUrl() + "/subscriptions/unauthenticated", null, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(split),
|
||||
});
|
||||
} else {
|
||||
return await this.fetchJson(this.authApiUrl() + "/subscriptions/unauthenticated", {
|
||||
channels: this.getUnauthenticatedChannels(),
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
async loadChannelGroups() {
|
||||
|
|
Loading…
Reference in a new issue