This commit is contained in:
2025-03-14 01:41:53 +08:00
parent efef48a1b0
commit d947043a16
12 changed files with 284 additions and 65 deletions

21
src/routes/config/list.ts Normal file
View File

@@ -0,0 +1,21 @@
import { app } from '@/app.ts';
import { ConfigModel } from './models/model.ts';
app
.route({
path: 'config',
key: 'list',
middleware: ['auth'],
})
.define(async (ctx) => {
const { id } = ctx.state.tokenUser;
const config = await ConfigModel.findAll({
where: {
uid: id,
},
});
ctx.body = {
list: config,
};
})
.addTo(app);