mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-04 21:28:34 +08:00
fix: model toJSON
This commit is contained in:
parent
77225a4e25
commit
84e52448f5
@ -8,7 +8,7 @@ export const dateTemplate = async (ctx: Context, next) => {
|
|||||||
await next();
|
await next();
|
||||||
|
|
||||||
if (isTemplate && actionName === 'get' && fields.length > 0) {
|
if (isTemplate && actionName === 'get' && fields.length > 0) {
|
||||||
ctx.body = traverseJSON(ctx.body?.toJSON(), {
|
ctx.body = traverseJSON(JSON.parse(JSON.stringify(ctx.body)), {
|
||||||
collection: ctx.db.getCollection(resourceName),
|
collection: ctx.db.getCollection(resourceName),
|
||||||
include: fields,
|
include: fields,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user