no more 401 error for publicly browsing user
This commit is contained in:
@@ -157,6 +157,7 @@ export const authAPI = {
|
||||
logout: () => api.post("/auth/logout"),
|
||||
refresh: () => api.post("/auth/refresh"),
|
||||
getCSRFToken: () => api.get("/auth/csrf-token"),
|
||||
getStatus: () => api.get("/auth/status"),
|
||||
};
|
||||
|
||||
export const userAPI = {
|
||||
@@ -280,23 +281,4 @@ export const conditionCheckAPI = {
|
||||
getAvailableChecks: () => api.get("/condition-checks"),
|
||||
};
|
||||
|
||||
export const notificationAPI = {
|
||||
getNotifications: (params?: { limit?: number; page?: number }) =>
|
||||
api.get("/notifications", { params }),
|
||||
getUnreadCount: () => api.get("/notifications/unread-count"),
|
||||
markAsRead: (notificationId: string) =>
|
||||
api.patch(`/notifications/${notificationId}/read`),
|
||||
markAllAsRead: () => api.patch("/notifications/mark-all-read"),
|
||||
// Development endpoints
|
||||
createTestNotification: (data: {
|
||||
type?: string;
|
||||
title: string;
|
||||
message: string;
|
||||
metadata?: any;
|
||||
}) => api.post("/notifications/test", data),
|
||||
triggerConditionReminders: () =>
|
||||
api.post("/notifications/test/condition-reminders"),
|
||||
cleanupExpired: () => api.post("/notifications/test/cleanup-expired"),
|
||||
};
|
||||
|
||||
export default api;
|
||||
|
||||
Reference in New Issue
Block a user