Notifications router
An overview of the Notifications router
Procedures
The notifications router has the following procedures:
Get the notifications inbox
Returns all the notifications for the current user.
// Client componentsconst { data } = api.notifications.inbox.useQuery()// Server componentsconst data = await api.notifications.inbox()
Mark a notification as read
Marks a notification as read.
- Access:
@protected
// Client componentsconst { data } = api.notifications.markAsRead.useMutation({notificationId: 'notification-id',})// Server componentsconst data = await api.notifications.markAsRead({notificationId: 'notification-id',})
Was this helpful?