fix(server): fix messages in data-wrapping (#3485)
This commit is contained in:
parent
33edd78531
commit
237c4aa084
@ -31,9 +31,7 @@ export function dataWrapping() {
|
||||
ctx.body = {
|
||||
data: ctx.body,
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (ctx.body) {
|
||||
const { rows, ...meta } = ctx.body;
|
||||
|
||||
@ -56,6 +54,7 @@ export function dataWrapping() {
|
||||
data: ctx.body,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx.body && ctx.state.messages?.length) {
|
||||
ctx.body.messages = ctx.state.messages;
|
||||
|
Loading…
Reference in New Issue
Block a user