unconventional 1.4.0 → 1.4.2
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.
|
@@ -145,6 +145,8 @@ class AbstractBaseController {
|
|
|
145
145
|
let limit = parseInt(queryParams.limit) || this._pageLimitDefault;
|
|
146
146
|
if (limit > this._pageLimitMax && !options?.limitOverride)
|
|
147
147
|
limit = this._pageLimitMax;
|
|
148
|
+
else if (limit < 0)
|
|
149
|
+
limit = this._pageLimitDefault;
|
|
148
150
|
// Request
|
|
149
151
|
let response = await this._service.getAll({
|
|
150
152
|
limit: limit,
|
|
@@ -93,7 +93,7 @@ class BaseService {
|
|
|
93
93
|
}
|
|
94
94
|
if (!page) {
|
|
95
95
|
const limit = modifiers.limit ? (modifiers.limit > 0 ? modifiers.limit : undefined) : 12;
|
|
96
|
-
page = await this.model.findMany({
|
|
96
|
+
page = await this.model.findMany({ ...modifiers, limit });
|
|
97
97
|
if (cache) {
|
|
98
98
|
await base_cache_1.BaseCache.setPage(cache, page, modifiers, cacheTTL);
|
|
99
99
|
}
|