notification count

This commit is contained in:
hamid zarghami
2025-12-21 15:05:23 +03:30
parent 2a1c81181e
commit 7cb14b0aa7
4 changed files with 28 additions and 4 deletions
@@ -1,5 +1,8 @@
import axios from "../../../config/axios";
import type { GetNotificationsResponse } from "../types/NotificationTypes";
import type {
GetNotificationsResponse,
GetUnseenCountResponse,
} from "../types/NotificationTypes";
export const getNotifications = async (
cursor: string | undefined,
@@ -20,3 +23,10 @@ export const readAll = async () => {
const { data } = await axios.patch(`/admin/notifications/read-all`);
return data;
};
export const getUnseenCount = async (): Promise<GetUnseenCountResponse> => {
const { data } = await axios.get<GetUnseenCountResponse>(
`/admin/notifications/unseen-count`
);
return data;
};