• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atlp-rwanda / e-commerce-mavericks-fn / 9874330397

10 Jul 2024 12:37PM UTC coverage: 0.0%. Remained the same
9874330397

push

github

web-flow
Merge pull request #31 from atlp-rwanda/fit-notifications

Finishes the notification task

0 of 69 branches covered (0.0%)

Branch coverage included in aggregate %.

0 of 389 new or added lines in 5 files covered. (0.0%)

0 of 3496 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/services/notificationsAPI.ts
NEW
1
import { mavericksApi } from '.';
×
NEW
2

×
NEW
3
const notificationsApi = mavericksApi.injectEndpoints({
×
NEW
4
  endpoints: builder => ({
×
NEW
5
    getNotifications: builder.query({
×
NEW
6
      query: userId => `notifications/${userId}`,
×
NEW
7
      providesTags: ['Notifications'],
×
NEW
8
    }),
×
NEW
9
    markNotificationAsRead: builder.mutation({
×
NEW
10
      query: ({ isRead, id }) => ({
×
NEW
11
        url: `notifications/${id}`,
×
NEW
12
        method: 'PATCH',
×
NEW
13
        body: { isRead },
×
NEW
14
      }),
×
NEW
15
    }),
×
NEW
16
    deleteSingleNotifications: builder.mutation({
×
NEW
17
      query: notificationID => ({
×
NEW
18
        url: `notifications/${notificationID}`,
×
NEW
19
        method: 'DELETE',
×
NEW
20
      }),
×
NEW
21
    }),
×
NEW
22
    deleteAllNotifications: builder.mutation({
×
NEW
23
      query: userId => ({
×
NEW
24
        url: `notifications/delete/${userId}`,
×
NEW
25
        method: 'DELETE',
×
NEW
26
      }),
×
NEW
27
      invalidatesTags: ['Notifications'],
×
NEW
28
    }),
×
NEW
29
    markAllNotificationsAsRead: builder.mutation({
×
NEW
30
      query: ({ userId, isRead }) => ({
×
NEW
31
        url: `notifications/update/${userId}`,
×
NEW
32
        method: 'PATCH',
×
NEW
33
        body: { isRead },
×
NEW
34
      }),
×
NEW
35
      invalidatesTags: ['Notifications'],
×
NEW
36
    }),
×
NEW
37
  }),
×
NEW
38
  overrideExisting: true,
×
NEW
39
});
×
NEW
40

×
NEW
41
export const {
×
NEW
42
  useGetNotificationsQuery,
×
NEW
43
  useDeleteAllNotificationsMutation,
×
NEW
44
  useDeleteSingleNotificationsMutation,
×
NEW
45
  useMarkNotificationAsReadMutation,
×
NEW
46
  useMarkAllNotificationsAsReadMutation,
×
NEW
47
} = notificationsApi;
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc