mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-03 20:58:01 +08:00
fix(server): empty data wrapping
This commit is contained in:
parent
ec94565259
commit
34c9ec123e
@ -15,7 +15,7 @@ export async function get(ctx: Context, next) {
|
||||
context: ctx,
|
||||
});
|
||||
|
||||
ctx.body = instance || {};
|
||||
ctx.body = instance || null;
|
||||
|
||||
await next();
|
||||
}
|
||||
|
@ -47,6 +47,10 @@ export function dataWrapping() {
|
||||
data: ctx.body,
|
||||
};
|
||||
}
|
||||
} else if (ctx.action) {
|
||||
ctx.body = {
|
||||
data: ctx.body,
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user