feat: 更新助手配置,添加应用ID和URL,优化身份验证和代理逻辑

This commit is contained in:
2025-12-18 20:56:18 +08:00
parent c77578805a
commit 91fdd6abc3
10 changed files with 259 additions and 44 deletions

View File

@@ -21,7 +21,16 @@ app
})
.define(async (ctx) => {
const { data } = ctx.query;
ctx.body = assistantConfig.setConfig(data);
ctx.body = assistantConfig.setConfig(data, true);
reload();
})
.addTo(app);
app.route({
path: 'config',
key: 'getId'
}).define(async (ctx) => {
const config = assistantConfig.getCacheAssistantConfig();
ctx.body = config?.app?.id || null;
}).addTo(app);