@dnax/core 0.30.2 → 0.30.4
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/driver/mongo/rest.ts +4 -1
- package/package.json +1 -1
package/driver/mongo/rest.ts
CHANGED
|
@@ -642,6 +642,9 @@ class useRest {
|
|
|
642
642
|
meta.total = await this.#tenant.database.db
|
|
643
643
|
?.collection(collection)
|
|
644
644
|
.estimatedDocumentCount();
|
|
645
|
+
} else {
|
|
646
|
+
meta.total = result.docs.length;
|
|
647
|
+
meta.count = result.docs.length;
|
|
645
648
|
}
|
|
646
649
|
|
|
647
650
|
if (col?.hooks?.afterFind && useHook) {
|
|
@@ -653,7 +656,7 @@ class useRest {
|
|
|
653
656
|
action: "find",
|
|
654
657
|
meta: meta,
|
|
655
658
|
count: result?.docs?.length || 0,
|
|
656
|
-
params: params,
|
|
659
|
+
params: toJson(params),
|
|
657
660
|
session: sessionStorage(),
|
|
658
661
|
result: result.docs,
|
|
659
662
|
rest: new useRest({
|