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,
|
context: ctx,
|
||||||
});
|
});
|
||||||
|
|
||||||
ctx.body = instance || {};
|
ctx.body = instance || null;
|
||||||
|
|
||||||
await next();
|
await next();
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,10 @@ export function dataWrapping() {
|
|||||||
data: ctx.body,
|
data: ctx.body,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
} else if (ctx.action) {
|
||||||
|
ctx.body = {
|
||||||
|
data: ctx.body,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user