function getUnreadCount
getUnreadCount(userId: string): number

Returns how many of userId's notifications are unread. The WebSocket route sends it in its welcome message, for the bell's count.

Parameters

userId: string

Return Type

number

Usage

import { getUnreadCount } from "api/services/notification-service.ts";