@dnax/core 0.34.0 → 0.35.0
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/app/hono.ts +13 -1
- package/package.json +1 -1
package/app/hono.ts
CHANGED
|
@@ -568,7 +568,13 @@ function HonoInstance(): typeof app {
|
|
|
568
568
|
col?.api?.fields?.select?.length &&
|
|
569
569
|
Array.isArray(col?.api?.fields?.select?.length)
|
|
570
570
|
) {
|
|
571
|
-
|
|
571
|
+
if (body?.withMeta) {
|
|
572
|
+
try {
|
|
573
|
+
response.data = pick(response.data, col?.api?.fields?.select || []);
|
|
574
|
+
} catch (err) {}
|
|
575
|
+
} else {
|
|
576
|
+
response = pick(response, col?.api?.fields?.select || []);
|
|
577
|
+
}
|
|
572
578
|
}
|
|
573
579
|
if (
|
|
574
580
|
col?.api?.fields?.hidden?.length &&
|
|
@@ -576,6 +582,12 @@ function HonoInstance(): typeof app {
|
|
|
576
582
|
) {
|
|
577
583
|
let privateFields = col?.api?.fields?.hidden || [];
|
|
578
584
|
privateFields.push("password");
|
|
585
|
+
if (body?.withMeta) {
|
|
586
|
+
// If use Meta are included
|
|
587
|
+
try {
|
|
588
|
+
response.data = omit(response.data, privateFields);
|
|
589
|
+
} catch (e) {}
|
|
590
|
+
}
|
|
579
591
|
response = omit(response, privateFields);
|
|
580
592
|
} else {
|
|
581
593
|
response = omit(response, ["password"]);
|