Skip to content

Commit

Permalink
Remove the 'fields' parameter on the client side too
Browse files Browse the repository at this point in the history
  • Loading branch information
SamantazFox committed Nov 23, 2023
1 parent 9d5fa2b commit 7b6930c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/notifications.js
Expand Up @@ -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'
}, {
Expand All @@ -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' }
Expand Down

0 comments on commit 7b6930c

Please sign in to comment.