This commit is contained in:
2025-12-30 00:46:07 +08:00
parent 7370f649c4
commit 27e5fb5e82
10 changed files with 19 additions and 147 deletions

View File

@@ -11,6 +11,7 @@ app
path: 'app',
key: 'list',
middleware: ['auth'],
description: '获取应用列表根据key进行过滤',
})
.define(async (ctx) => {
const tokenUser = ctx.state.tokenUser;
@@ -36,6 +37,7 @@ app
path: 'app',
key: 'get',
middleware: ['auth'],
description: '获取应用详情可以通过id或者key+version来获取',
})
.define(async (ctx) => {
const tokenUser = ctx.state.tokenUser;
@@ -68,6 +70,7 @@ app
path: 'app',
key: 'update',
middleware: ['auth'],
description: '创建或更新应用信息如果传入id则为更新否则为创建',
})
.define(async (ctx) => {
const tokenUser = ctx.state.tokenUser;
@@ -99,6 +102,7 @@ app
path: 'app',
key: 'delete',
middleware: ['auth'],
description: '删除应用信息,如果应用已发布,则不允许删除',
})
.define(async (ctx) => {
const id = ctx.query.id;
@@ -133,6 +137,7 @@ app
path: 'app',
key: 'canUploadFiles',
middleware: ['auth'],
description: '检查是否可以上传文件,如果当前版本已存在,则不允许上传',
})
.define(async (ctx) => {
const tokenUser = ctx.state.tokenUser;
@@ -153,6 +158,7 @@ app
key: 'uploadFiles',
middleware: ['auth'],
isDebug: true,
description: '上传应用文件,如果应用版本不存在,则创建应用版本记录',
})
.define(async (ctx) => {
try {
@@ -227,6 +233,7 @@ app
path: 'app',
key: 'publish',
middleware: ['auth'],
description: '发布应用,将某个版本的应用设置为当前应用的版本',
})
.define(async (ctx) => {
const tokenUser = ctx.state.tokenUser;
@@ -272,6 +279,7 @@ app
.route({
path: 'app',
key: 'getApp',
description: '获取应用信息可以通过id或者key+version来获取, 参数在data中传入',
})
.define(async (ctx) => {
const { user, key, id } = ctx.query.data;