feat: 助手配置与服务命令扩展及依赖更新
This commit is contained in:
27
assistant/src/routes/config/index.ts
Normal file
27
assistant/src/routes/config/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { app, assistantConfig } from '@/app.ts';
|
||||
// import { getCacheAssistantConfig, setConfig } from '@/modules/config/index.ts';
|
||||
// import { reload } from '@/modules/parent-msg.ts';
|
||||
|
||||
app
|
||||
.route({
|
||||
path: 'config',
|
||||
description: '获取配置',
|
||||
})
|
||||
.define(async (ctx) => {
|
||||
ctx.body = assistantConfig.getCacheAssistantConfig();
|
||||
})
|
||||
.addTo(app);
|
||||
|
||||
app
|
||||
.route({
|
||||
path: 'config',
|
||||
key: 'set',
|
||||
description: '设置配置',
|
||||
})
|
||||
.define(async (ctx) => {
|
||||
const { data } = ctx.query;
|
||||
// reload();
|
||||
|
||||
ctx.body = assistantConfig.setConfig(data);
|
||||
})
|
||||
.addTo(app);
|
||||
Reference in New Issue
Block a user