MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / markAsRead

Function markAsRead

src/components/NotificationDropdown.tsx:95–106  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

93 }, [isOpen]);
94
95 const markAsRead = async (id: string) => {
96 try {
97 await fetch("/api/notifications", {
98 method: "PATCH",
99 headers: { "Content-Type": "application/json" },
100 body: JSON.stringify({ id, read: true }),
101 });
102 await fetchNotifications();
103 } catch (error) {
104 console.error("Failed to mark as read:", error);
105 }
106 };
107
108 const markAllAsRead = async () => {
109 try {

Callers 2

handleNotificationClickFunction · 0.85
NotificationDropdownFunction · 0.85

Calls 1

fetchNotificationsFunction · 0.85

Tested by

no test coverage detected