This commit is contained in:
2024-09-30 01:39:07 +08:00
parent 962d89ff29
commit e05c042827
8 changed files with 152 additions and 9 deletions

View File

@@ -29,10 +29,15 @@ app
.route({
path: 'page',
key: 'list',
middleware: ['auth'],
})
.define(async (ctx) => {
const tokenUser = ctx.state.tokenUser;
ctx.body = await PageModel.findAll({
order: [['updatedAt', 'DESC']],
where: {
uid: tokenUser.id,
},
});
return ctx;
})