- import api from "src/api";
- export const getNotifications = async () => {
- const { data } = await api.get("/notifications");
- return data.payload;
- };
- export const markNotificationAsRead = async (id) => {
- await api.put(`/notifications/${id}/read`);
- };
- export const markAllNotificationsAsRead = async () => {
- await api.put("/notifications/read-all");
- };
|