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

Updated baseurl for delete notifications

parent 353d4b63
No related branches found
No related tags found
No related merge requests found
......@@ -33,20 +33,8 @@ const NotificationsPage = () => {
throw new Error("Failed to fetch notifications");
}
const data = await response.json();
// const data = [
// {
// _id: "1",
// title: "Booked another parking space",
// description: "booked at this area",
// date: "2023-04-20T07:59:52.289Z",
// },
// {
// _id: "2",
// title: "Booked space",
// description: "booked this area",
// date: "2023-04-20T07:59:52.289Z",
// },
// ];
setNotifications(data);
setLoading(false);
} catch (error) {
......@@ -57,7 +45,7 @@ const NotificationsPage = () => {
const deleteNotification = async (notificationId) => {
try {
const response = await fetch(`/api/notifications/delete/${notificationId}`, {
const response = await fetch(`${baseUrl}/notification/delete/${notificationId}`, {
method: "DELETE",
headers: {
Authorization: `Bearer ${localStorage.getItem("token")}`,
......@@ -90,7 +78,7 @@ const NotificationsPage = () => {
const clearAllNotifications = async () => {
// make a request to the notifications microservice to clear all notifications
try {
const response = await fetch(`/api/notifications/delete/all/`, {
const response = await fetch(`${baseUrl}/notification/delete/all/`, {
method: "DELETE",
headers: {
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