From a2b751ed2bf0d99e6e052bee5c7070d32c808346 Mon Sep 17 00:00:00 2001 From: Josh Everett <44347292+MrJoshE@users.noreply.github.com> Date: Thu, 20 Apr 2023 16:47:25 +0100 Subject: [PATCH] Updated API endpoint for delete all notifications --- src/pages/notifications/notifications.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/notifications/notifications.js b/src/pages/notifications/notifications.js index 568f919..d57ddc1 100644 --- a/src/pages/notifications/notifications.js +++ b/src/pages/notifications/notifications.js @@ -47,6 +47,7 @@ const NotificationsPage = () => { try { const response = await fetch(`${baseUrl}/notification/delete/${notificationId}`, { headers: { + method: 'DELETE', Authorization: `Bearer ${localStorage.getItem("token")}`, }, }); @@ -77,7 +78,8 @@ const NotificationsPage = () => { const clearAllNotifications = async () => { // make a request to the notifications microservice to clear all notifications try { - const response = await fetch(`${baseUrl}/notification/delete/all`, { + const response = await fetch(`${baseUrl}/notification/delete-all`, { + method: 'DELETE', headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, -- GitLab