Fixed filter parameter and ensure refreshing notifications calls for notifications feeds only

This commit is contained in:
Djamil Legato
2019-02-11 16:33:50 -08:00
parent b520c799ec
commit 9f89ad46dc
2 changed files with 3 additions and 3 deletions

View File

@@ -89,7 +89,7 @@ class Notifications {
}
// Grav.default.Notifications.fetch()
fetch({ locations = notificationsFilters(), refresh = false } = {}) {
fetch({ filter = notificationsFilters(), refresh = false } = {}) {
if (!canFetchNotifications()) {
return false;
}
@@ -114,7 +114,7 @@ class Notifications {
request(`${config.base_url_relative}/task${config.param_sep}getNotifications`, {
method: 'post',
body: { refresh, filters: notificationsFilters() }
body: { refresh, filter }
}, (response) => {
processNotifications(response);
}).catch(() => {

File diff suppressed because one or more lines are too long