diff --git a/lib/utils/api/fetchAcqUnitsByIds.js b/lib/utils/api/fetchAcqUnitsByIds.js new file mode 100644 index 00000000..c36a5b4c --- /dev/null +++ b/lib/utils/api/fetchAcqUnitsByIds.js @@ -0,0 +1,11 @@ +import { ACQUISITIONS_UNITS_API } from '../../constants'; +import { fetchExportDataByIds } from '../fetchExportDataByIds'; + +export const fetchAcqUnitsByIds = (ky) => async (acquisitionUnitIds) => { + return fetchExportDataByIds({ + api: ACQUISITIONS_UNITS_API, + ids: acquisitionUnitIds, + ky, + records: 'acquisitionsUnits', + }); +}; diff --git a/lib/utils/api/index.js b/lib/utils/api/index.js index 959d968f..517fbc5c 100644 --- a/lib/utils/api/index.js +++ b/lib/utils/api/index.js @@ -1,3 +1,4 @@ +export { fetchAcqUnitsByIds } from './fetchAcqUnitsByIds'; export { fetchOrderLines } from './fetchOrderLines'; export { fetchOrderLinesByIds } from './fetchOrderLinesByIds'; export { fetchOrders } from './fetchOrders'; diff --git a/lib/utils/getAcqUnitsByIds.js b/lib/utils/getAcqUnitsByIds.js deleted file mode 100644 index bc8fd805..00000000 --- a/lib/utils/getAcqUnitsByIds.js +++ /dev/null @@ -1,11 +0,0 @@ -import { ACQUISITIONS_UNITS_API } from '../constants'; -import { fetchExportDataByIds } from './fetchExportDataByIds'; - -export const getAcqUnitsByIds = (ky) => async (acquisitionUnitIds) => { - return fetchExportDataByIds({ - api: ACQUISITIONS_UNITS_API, - ids: acquisitionUnitIds, - ky, - records: 'acquisitionsUnits', - }); -}; diff --git a/lib/utils/index.js b/lib/utils/index.js index b346a5f4..b29a795f 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -15,7 +15,6 @@ export * from './filterSelectValues'; export * from './formatDate'; export * from './formatDateTime'; export * from './generateQueryTemplate'; -export * from './getAcqUnitsByIds'; export * from './getAcqUnitsOptions'; export * from './getAddresses'; export * from './getAddressOptions';