mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 12:18:11 +00:00
fix: api prefix
This commit is contained in:
@@ -17,17 +17,17 @@ export const notificationsApi = {
|
|||||||
list: async (
|
list: async (
|
||||||
params: ListNotificationsParams = {},
|
params: ListNotificationsParams = {},
|
||||||
): Promise<NotificationListResult> => {
|
): Promise<NotificationListResult> => {
|
||||||
const { data } = await client.get("/notifications", { params });
|
const { data } = await client.get("/api/notifications", { params });
|
||||||
return data.data;
|
return data.data;
|
||||||
},
|
},
|
||||||
unreadCount: async (): Promise<number> => {
|
unreadCount: async (): Promise<number> => {
|
||||||
const { data } = await client.get("/notifications/unread-count");
|
const { data } = await client.get("/api/notifications/unread-count");
|
||||||
return data.data.unreadCount;
|
return data.data.unreadCount;
|
||||||
},
|
},
|
||||||
markRead: async (id: string): Promise<void> => {
|
markRead: async (id: string): Promise<void> => {
|
||||||
await client.patch(`/notifications/${id}/read`);
|
await client.patch(`/api/notifications/${id}/read`);
|
||||||
},
|
},
|
||||||
markAllRead: async (): Promise<void> => {
|
markAllRead: async (): Promise<void> => {
|
||||||
await client.post("/notifications/read-all");
|
await client.post("/api/notifications/read-all");
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user