fix: api prefix

This commit is contained in:
ghost2023
2026-07-06 11:58:06 +03:00
parent 01b92072aa
commit 8f5dfd83c5

View File

@@ -17,17 +17,17 @@ export const notificationsApi = {
list: async (
params: ListNotificationsParams = {},
): Promise<NotificationListResult> => {
const { data } = await client.get("/notifications", { params });
const { data } = await client.get("/api/notifications", { params });
return data.data;
},
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;
},
markRead: async (id: string): Promise<void> => {
await client.patch(`/notifications/${id}/read`);
await client.patch(`/api/notifications/${id}/read`);
},
markAllRead: async (): Promise<void> => {
await client.post("/notifications/read-all");
await client.post("/api/notifications/read-all");
},
};