summaryrefslogtreecommitdiffstats
path: root/assets/js
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2024-02-12 22:10:45 +0100
committerSamantaz Fox <coding@samantaz.fr>2024-02-12 22:10:45 +0100
commit1f51255f2f5ed53e1f9e50df7d6aad73a9f121d3 (patch)
treefb6f21b09fca3912834329bafd138034ac2cdb0a /assets/js
parentdcbe52c9fb3225190ad5ce26731a51a4c2414c5c (diff)
parent7b6930c16bd731880591491490a269c73555027e (diff)
downloadinvidious-1f51255f2f5ed53e1f9e50df7d6aad73a9f121d3.tar.gz
invidious-1f51255f2f5ed53e1f9e50df7d6aad73a9f121d3.tar.bz2
invidious-1f51255f2f5ed53e1f9e50df7d6aad73a9f121d3.zip
API: Remove the fields parameter (#4276)
Multiple users have reported that the fields parameter is slowing down API response times significantly. As most API endpoints are already optimized to make as few requests as possible to Youtube, there is no point in limiting the output. Furthermore, the added processing might be part of the broader memory leak problem (See 1438). In addition, the small increase in data output is not much of an issue compared to the huge video proxy that lies next to this API. No related issue tracked
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/notifications.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/assets/js/notifications.js b/assets/js/notifications.js
index 058553d9..55b7a15c 100644
--- a/assets/js/notifications.js
+++ b/assets/js/notifications.js
@@ -10,7 +10,7 @@ var notifications, delivered;
var notifications_mock = { close: function () { } };
function get_subscriptions() {
- helpers.xhr('GET', '/api/v1/auth/subscriptions?fields=authorId', {
+ helpers.xhr('GET', '/api/v1/auth/subscriptions', {
retries: 5,
entity_name: 'subscriptions'
}, {
@@ -22,7 +22,7 @@ function create_notification_stream(subscriptions) {
// sse.js can't be replaced to EventSource in place as it lack support of payload and headers
// see https://developer.mozilla.org/en-US/docs/Web/API/EventSource/EventSource
notifications = new SSE(
- '/api/v1/auth/notifications?fields=videoId,title,author,authorId,publishedText,published,authorThumbnails,liveNow', {
+ '/api/v1/auth/notifications', {
withCredentials: true,
payload: 'topics=' + subscriptions.map(function (subscription) { return subscription.authorId; }).join(','),
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }