adminforth 1.3.10 → 1.3.11
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.
|
@@ -31,11 +31,19 @@ export default class OperationalResource {
|
|
|
31
31
|
}
|
|
32
32
|
list(filter, limit, offset, sort) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
let appliedLimit = limit;
|
|
35
|
+
if (limit === null) {
|
|
36
|
+
appliedLimit = 1000000000;
|
|
37
|
+
}
|
|
38
|
+
let appliedOffset = offset;
|
|
39
|
+
if (offset === null) {
|
|
40
|
+
appliedOffset = 0;
|
|
41
|
+
}
|
|
34
42
|
const { data } = yield this.dataConnector.getData({
|
|
35
43
|
resource: this.resourceConfig,
|
|
36
44
|
filters: filtersIfFilter(filter),
|
|
37
|
-
limit,
|
|
38
|
-
offset,
|
|
45
|
+
limit: appliedLimit,
|
|
46
|
+
offset: appliedOffset,
|
|
39
47
|
sort: sortsIfSort(sort),
|
|
40
48
|
getTotals: false,
|
|
41
49
|
});
|
|
@@ -32,15 +32,24 @@ export default class OperationalResource implements IOperationalResource {
|
|
|
32
32
|
|
|
33
33
|
async list(
|
|
34
34
|
filter: IAdminForthFilter | IAdminForthFilter[],
|
|
35
|
-
limit: number,
|
|
36
|
-
offset: number,
|
|
35
|
+
limit: number | null,
|
|
36
|
+
offset: number | null,
|
|
37
37
|
sort: IAdminForthSort | IAdminForthSort[]
|
|
38
38
|
): Promise<any[]> {
|
|
39
|
+
let appliedLimit = limit;
|
|
40
|
+
if (limit === null) {
|
|
41
|
+
appliedLimit = 1000000000;
|
|
42
|
+
}
|
|
43
|
+
let appliedOffset = offset;
|
|
44
|
+
if (offset === null) {
|
|
45
|
+
appliedOffset = 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
39
48
|
const { data } = await this.dataConnector.getData({
|
|
40
49
|
resource: this.resourceConfig,
|
|
41
50
|
filters: filtersIfFilter(filter),
|
|
42
|
-
limit,
|
|
43
|
-
offset,
|
|
51
|
+
limit: appliedLimit,
|
|
52
|
+
offset: appliedOffset,
|
|
44
53
|
sort: sortsIfSort(sort),
|
|
45
54
|
getTotals: false,
|
|
46
55
|
});
|