is there any difference below?
controllers
async function get (ctx, next) {
const res = await models.test.get()
ctx.state.data = res.data
/******* ********/
ctx.body = res.data
await next()
}
module.exports = {
get
}
routes
router.get("/", controllers.test.get, async (ctx, next) => {
await ctx.render("test", {
list: ctx.state.data.obj,
/******* ********/
list: ctx.body.obj,
})
})