notification count
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user