@northern.tech/store 0.45.0 → 0.45.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonSelectors.d.cts +4 -4
- package/dist/commonSelectors.d.ts +4 -4
- package/dist/devicesSlice/thunks.d.cts +1 -1
- package/dist/devicesSlice/thunks.d.ts +1 -1
- package/dist/thunks.cjs +3 -2
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.js +3 -2
- package/dist/thunks.js.map +1 -1
- package/package.json +1 -1
package/dist/thunks.js
CHANGED
|
@@ -1013,7 +1013,7 @@ const searchDevices = createAppAsyncThunk(`${sliceName$2}/searchDevices`, async
|
|
|
1013
1013
|
searchTotal: Number(response.headers[headerNames.total])
|
|
1014
1014
|
};
|
|
1015
1015
|
});
|
|
1016
|
-
const searchIdentities = createAppAsyncThunk(`${sliceName$2}/searchIdentities`, async (options, { dispatch }) => {
|
|
1016
|
+
const searchIdentities = createAppAsyncThunk(`${sliceName$2}/searchIdentities`, async (options, { dispatch, getState }) => {
|
|
1017
1017
|
const { attributes: additionalAttributes = [], page = defaultPage$1, per_page = defaultPerPage$1, ...remainder } = options;
|
|
1018
1018
|
const response = await Api.post(`${inventoryApiUrlV2alpha1}/identities/search`, {
|
|
1019
1019
|
...remainder,
|
|
@@ -1021,8 +1021,9 @@ const searchIdentities = createAppAsyncThunk(`${sliceName$2}/searchIdentities`,
|
|
|
1021
1021
|
page,
|
|
1022
1022
|
per_page
|
|
1023
1023
|
}).catch((err) => commonErrorHandler(err, `devices couldn't be searched.`, dispatch, commonErrorFallback));
|
|
1024
|
+
const { devicesById } = reduceReceivedDevices(response.data, [], getState());
|
|
1024
1025
|
return {
|
|
1025
|
-
devices:
|
|
1026
|
+
devices: Object.values(devicesById),
|
|
1026
1027
|
total: Number(response.headers[headerNames.total])
|
|
1027
1028
|
};
|
|
1028
1029
|
});
|