From 52326e65515317be4815aaef320965313f84d64b Mon Sep 17 00:00:00 2001 From: dave Date: Thu, 14 Mar 2019 11:57:24 -0400 Subject: #436: remove clear & dismiss UI updates --- src/services/api/api.service.js | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'src/services/api/api.service.js') diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 9d3139ce..03553d75 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -43,8 +43,6 @@ const SUGGESTIONS_URL = '/api/v1/suggestions' const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites' const MASTODON_USER_NOTIFICATIONS_URL = '/api/v1/notifications' -const MASTODON_USER_NOTIFICATIONS_CLEAR_URL = '/api/v1/notifications/clear' -const MASTODON_USER_NOTIFICATIONS_DISMISS_URL = '/api/v1/notifications/dismiss' import { each, map } from 'lodash' import { parseStatus, parseUser, parseNotification } from '../entity_normalizer/entity_normalizer.service.js' @@ -577,25 +575,6 @@ const markNotificationsAsSeen = ({id, credentials}) => { }).then((data) => data.json()) } -const clearNotifications = ({ credentials }) => { - return fetch(MASTODON_USER_NOTIFICATIONS_CLEAR_URL, { - headers: authHeaders(credentials), - method: 'POST' - }).then((data) => data.json()) -} - -const dismissNotifications = ({ id, credentials }) => { - const body = new FormData() - - body.append('id', id) - - return fetch(MASTODON_USER_NOTIFICATIONS_DISMISS_URL, { - body, - headers: authHeaders(credentials), - method: 'POST' - }).then((data) => data.json()) -} - const apiService = { verifyCredentials, fetchTimeline, @@ -636,9 +615,7 @@ const apiService = { approveUser, denyUser, suggestions, - markNotificationsAsSeen, - clearNotifications, - dismissNotifications + markNotificationsAsSeen } export default apiService -- cgit v1.2.3-70-g09d2