This commit is contained in:
COOL 2025-02-12 14:18:35 +08:00
parent 338c43eea7
commit 0a419b038d
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,25 @@
import { CoolController, BaseController, CoolTag, TagTypes } from '@cool-midway/core';
import { Body, Get, Inject, Post } from '@midwayjs/core';
import { BaseCodingService } from '../../service/coding';
/**
* Ai编码
*/
@CoolController()
export class AdminCodingController extends BaseController {
@Inject()
baseCodingService: BaseCodingService;
@Get('/getModuleTree', { summary: '获取模块目录结构' })
async getModuleTree() {
return this.baseCodingService.getModuleTree();
}
@Post('/createCode', { summary: '创建代码' })
async createCode(@Body() codes: {
path: string;
content: string;
}[]) {
return this.baseCodingService.createCode(codes);
}
}

View File

@ -28,7 +28,7 @@ export default () => {
// 刷新token 过期时间,单位秒
refreshExpire: 60 * 60 * 24 * 30,
// jwt 秘钥
secret: 'cool-app-xxxxxx',
secret: 'f5f0adba-f2e2-4efd-aefb-adc562ebf3acx',
},
} as ModuleConfig;
};