This commit is contained in:
2025-11-24 18:58:32 +08:00
parent 8b9fdb706f
commit a2cee7c27a
28 changed files with 931 additions and 81 deletions

View File

@@ -8,7 +8,8 @@ import { eq } from 'drizzle-orm';
app.route({
description: '列出问题库',
path: 'library',
key: 'list'
key: 'list',
middleware: ['auth']
}).define(async (ctx) => {
const query = ctx.query;
const page = query.page ?? 1;
@@ -47,7 +48,8 @@ app.route({
app.route({
description: '更新问题库',
path: 'library',
key: 'update'
key: 'update',
middleware: ['auth']
}).define(async (ctx) => {
const query = ctx.query;
const id = query.id;
@@ -104,7 +106,8 @@ app.route({
app.route({
description: '删除问题库',
path: 'library',
key: 'delete'
key: 'delete',
middleware: ['auth']
}).define(async (ctx) => {
const query = ctx.query;
const id = query.id;
@@ -130,7 +133,8 @@ app.route({
app.route({
description: '获取问题库详情',
path: 'library',
key: 'detail'
key: 'detail',
middleware: ['auth']
}).define(async (ctx) => {
const query = ctx.query;
const id = query.id;