Skip to content
Snippets Groups Projects
Commit a2b751ed authored by Josh Everett's avatar Josh Everett
Browse files

Updated API endpoint for delete all notifications

parent 20a13465
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,7 @@ const NotificationsPage = () => { ...@@ -47,6 +47,7 @@ const NotificationsPage = () => {
try { try {
const response = await fetch(`${baseUrl}/notification/delete/${notificationId}`, { const response = await fetch(`${baseUrl}/notification/delete/${notificationId}`, {
headers: { headers: {
method: 'DELETE',
Authorization: `Bearer ${localStorage.getItem("token")}`, Authorization: `Bearer ${localStorage.getItem("token")}`,
}, },
}); });
...@@ -77,7 +78,8 @@ const NotificationsPage = () => { ...@@ -77,7 +78,8 @@ const NotificationsPage = () => {
const clearAllNotifications = async () => { const clearAllNotifications = async () => {
// make a request to the notifications microservice to clear all notifications // make a request to the notifications microservice to clear all notifications
try { try {
const response = await fetch(`${baseUrl}/notification/delete/all`, { const response = await fetch(`${baseUrl}/notification/delete-all`, {
method: 'DELETE',
headers: { headers: {
Authorization: `Bearer ${localStorage.getItem("token")}`, Authorization: `Bearer ${localStorage.getItem("token")}`,
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment