diff --git a/maternal-web/lib/api/notifications.ts b/maternal-web/lib/api/notifications.ts index 13c41dc..2aa5298 100644 --- a/maternal-web/lib/api/notifications.ts +++ b/maternal-web/lib/api/notifications.ts @@ -44,7 +44,7 @@ export const notificationsApi = { * Get user notifications with optional filters */ async getNotifications(params?: GetNotificationsParams): Promise { - const { data } = await apiClient.get>('/notifications', { params }); + const { data } = await apiClient.get>('/api/v1/notifications', { params }); const notifications = data.data.notifications; const unreadCount = notifications.filter(n => !n.readAt && !n.dismissedAt).length; @@ -60,7 +60,7 @@ export const notificationsApi = { * Mark a notification as read */ async markAsRead(notificationId: string): Promise { - const { data } = await apiClient.patch>(`/notifications/${notificationId}/read`); + const { data } = await apiClient.patch>(`/api/v1/notifications/${notificationId}/read`); // Backend returns success message, not the notification, so we return empty object return {} as Notification; }, @@ -69,7 +69,7 @@ export const notificationsApi = { * Mark all notifications as read */ async markAllAsRead(): Promise<{ count: number }> { - await apiClient.patch>('/notifications/mark-all-read'); + await apiClient.patch>('/api/v1/notifications/mark-all-read'); return { count: 0 }; // Backend doesn't return count }, @@ -77,7 +77,7 @@ export const notificationsApi = { * Dismiss a notification */ async dismiss(notificationId: string): Promise { - await apiClient.patch>(`/notifications/${notificationId}/dismiss`); + await apiClient.patch>(`/api/v1/notifications/${notificationId}/dismiss`); return {} as Notification; },