File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -2452,6 +2452,10 @@ class ApiMethods {
2452
2452
) ;
2453
2453
return res . data ;
2454
2454
} ;
2455
+
2456
+ markAllInboxNotificationsAsRead = async ( ) => {
2457
+ await this . axios . put < void > ( "/api/v2/notifications/inbox/mark-all-as-read" ) ;
2458
+ } ;
2455
2459
}
2456
2460
2457
2461
// This is a hard coded CSRF token/cookie pair for local development. In prod,
Original file line number Diff line number Diff line change @@ -69,9 +69,7 @@ export const NavbarView: FC<NavbarViewProps> = ({
69
69
70
70
< NotificationsInbox
71
71
fetchNotifications = { API . getInboxNotifications }
72
- markAllAsRead = { ( ) => {
73
- throw new Error ( "Function not implemented." ) ;
74
- } }
72
+ markAllAsRead = { API . markAllInboxNotificationsAsRead }
75
73
markNotificationAsRead = { ( notificationId ) =>
76
74
API . updateInboxNotificationReadStatus ( notificationId , {
77
75
is_read : true ,
@@ -92,9 +90,7 @@ export const NavbarView: FC<NavbarViewProps> = ({
92
90
< div className = "ml-auto flex items-center gap-3 md:hidden" >
93
91
< NotificationsInbox
94
92
fetchNotifications = { API . getInboxNotifications }
95
- markAllAsRead = { ( ) => {
96
- throw new Error ( "Function not implemented." ) ;
97
- } }
93
+ markAllAsRead = { API . markAllInboxNotificationsAsRead }
98
94
markNotificationAsRead = { ( notificationId ) =>
99
95
API . updateInboxNotificationReadStatus ( notificationId , {
100
96
is_read : true ,
You can’t perform that action at this time.
0 commit comments