fix
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import { app, assistantConfig } from '@/app.ts';
|
||||
// import { getCacheAssistantConfig, setConfig } from '@/modules/config/index.ts';
|
||||
// import { reload } from '@/modules/parent-msg.ts';
|
||||
import { reload } from '../../module/reload-server.ts';
|
||||
|
||||
app
|
||||
.route({
|
||||
path: 'config',
|
||||
description: '获取配置',
|
||||
middleware: ['auth'],
|
||||
middleware: ['admin-auth'],
|
||||
})
|
||||
.define(async (ctx) => {
|
||||
ctx.body = assistantConfig.getCacheAssistantConfig();
|
||||
@@ -18,12 +17,11 @@ app
|
||||
path: 'config',
|
||||
key: 'set',
|
||||
description: '设置配置',
|
||||
middleware: ['auth'],
|
||||
middleware: ['admin-auth'],
|
||||
})
|
||||
.define(async (ctx) => {
|
||||
const { data } = ctx.query;
|
||||
// reload();
|
||||
|
||||
ctx.body = assistantConfig.setConfig(data);
|
||||
reload();
|
||||
})
|
||||
.addTo(app);
|
||||
|
||||
Reference in New Issue
Block a user