diff --git a/src/api/ticketNotifications.ts b/src/api/ticketNotifications.ts index 3adf58f..36a30b3 100644 --- a/src/api/ticketNotifications.ts +++ b/src/api/ticketNotifications.ts @@ -32,9 +32,11 @@ export const ticketNotificationsApi = { // Admin notifications getAdminNotifications: async (unreadOnly = false, limit = 50, offset = 0): Promise => { - const response = await apiClient.get('/cabinet/admin/tickets/notifications', { - params: { unread_only: unreadOnly, limit, offset } - }) + const params: Record = { limit, offset } + if (unreadOnly) { + params.unread_only = true + } + const response = await apiClient.get('/cabinet/admin/tickets/notifications', { params }) return response.data },