@candlerip/shared 0.0.135 → 0.0.136
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.
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { DEFAULT_CANDLE_FILTER_SORT } from '../../../../common/index.js';
|
|
1
2
|
import { getCandlesDb } from '../../../mutation/index.js';
|
|
2
|
-
export const composeCandlesPageDataDb = async (
|
|
3
|
+
export const composeCandlesPageDataDb = async (initFilterSort) => {
|
|
4
|
+
const filterSort = {
|
|
5
|
+
...DEFAULT_CANDLE_FILTER_SORT,
|
|
6
|
+
...initFilterSort,
|
|
7
|
+
};
|
|
3
8
|
const { burningStates, count, skipCount, sortName, sortOrder, userId } = filterSort;
|
|
4
9
|
const resp = await getCandlesDb({
|
|
5
10
|
burningStates,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { CandleFilterSort, CandlesPageData, CustomError } from '../../../../common/index.js';
|
|
2
|
-
export type ComposeCandlesPageDataDb = (
|
|
3
|
-
filterSort: CandleFilterSort;
|
|
4
|
-
}) => Promise<{
|
|
2
|
+
export type ComposeCandlesPageDataDb = (filterSort?: Partial<CandleFilterSort>) => Promise<{
|
|
5
3
|
data: CandlesPageData;
|
|
6
4
|
} | {
|
|
7
5
|
customError: CustomError;
|