|
1 |
| -import { ASSETS_CATEGORIES, IMAGE_CATEGORIES } from 'features/gallery/store/types'; |
2 |
| -import type { |
3 |
| - BoardDTO, |
4 |
| - CreateBoardArg, |
5 |
| - ListBoardsArgs, |
6 |
| - OffsetPaginatedResults_ImageDTO_, |
7 |
| - S, |
8 |
| - UpdateBoardArg, |
9 |
| -} from 'services/api/types'; |
10 |
| -import { getListImagesUrl } from 'services/api/util'; |
| 1 | +import type { BoardDTO, CreateBoardArg, ListBoardsArgs, S, UpdateBoardArg } from 'services/api/types'; |
11 | 2 |
|
12 | 3 | import type { ApiTagDescription } from '..';
|
13 | 4 | import { api, buildV1Url, LIST_TAG } from '..';
|
@@ -63,40 +54,6 @@ export const boardsApi = api.injectEndpoints({
|
63 | 54 | providesTags: ['UncategorizedImageCounts', { type: 'Board', id: LIST_TAG }, { type: 'Board', id: 'none' }],
|
64 | 55 | }),
|
65 | 56 |
|
66 |
| - getBoardImagesTotal: build.query<{ total: number }, string | undefined>({ |
67 |
| - query: (board_id) => ({ |
68 |
| - url: getListImagesUrl({ |
69 |
| - board_id: board_id ?? 'none', |
70 |
| - categories: IMAGE_CATEGORIES, |
71 |
| - is_intermediate: false, |
72 |
| - limit: 0, |
73 |
| - offset: 0, |
74 |
| - }), |
75 |
| - method: 'GET', |
76 |
| - }), |
77 |
| - providesTags: (result, error, arg) => [{ type: 'BoardImagesTotal', id: arg ?? 'none' }, 'FetchOnReconnect'], |
78 |
| - transformResponse: (response: OffsetPaginatedResults_ImageDTO_) => { |
79 |
| - return { total: response.total }; |
80 |
| - }, |
81 |
| - }), |
82 |
| - |
83 |
| - getBoardAssetsTotal: build.query<{ total: number }, string | undefined>({ |
84 |
| - query: (board_id) => ({ |
85 |
| - url: getListImagesUrl({ |
86 |
| - board_id: board_id ?? 'none', |
87 |
| - categories: ASSETS_CATEGORIES, |
88 |
| - is_intermediate: false, |
89 |
| - limit: 0, |
90 |
| - offset: 0, |
91 |
| - }), |
92 |
| - method: 'GET', |
93 |
| - }), |
94 |
| - providesTags: (result, error, arg) => [{ type: 'BoardAssetsTotal', id: arg ?? 'none' }, 'FetchOnReconnect'], |
95 |
| - transformResponse: (response: OffsetPaginatedResults_ImageDTO_) => { |
96 |
| - return { total: response.total }; |
97 |
| - }, |
98 |
| - }), |
99 |
| - |
100 | 57 | /**
|
101 | 58 | * Boards Mutations
|
102 | 59 | */
|
@@ -132,8 +89,6 @@ export const boardsApi = api.injectEndpoints({
|
132 | 89 |
|
133 | 90 | export const {
|
134 | 91 | useListAllBoardsQuery,
|
135 |
| - useGetBoardImagesTotalQuery, |
136 |
| - useGetBoardAssetsTotalQuery, |
137 | 92 | useCreateBoardMutation,
|
138 | 93 | useUpdateBoardMutation,
|
139 | 94 | useListAllImageNamesForBoardQuery,
|
|
0 commit comments