| 123456789101112131415161718192021 |
- import api from "src/api";
- export const getMyNotifications = async () => {
- const { data } = await api.get("/notification/me");
- return data.payload;
- };
- export const getUnreadCount = async () => {
- const { data } = await api.get("/notification/me/unread-count");
- return data.payload?.count ?? 0;
- };
- export const markNotificationRead = async (id) => {
- const { data } = await api.post(`/notification/${id}/read`);
- return data.payload;
- };
- export const markAllNotificationsRead = async () => {
- const { data } = await api.post("/notification/read-all");
- return data.payload;
- };
|