1
This commit is contained in:
8
app.js
8
app.js
@@ -27,8 +27,12 @@ async function start() {
|
||||
const { buildProxyRoutes } = require('./api/controller_custom/proxy_api');
|
||||
// 从 swagger.json 动态注册 193 个转发路由到 /api 前缀
|
||||
const proxyRoutes = buildProxyRoutes();
|
||||
framework.addRoutes('/api', proxyRoutes);
|
||||
console.log(`📡 已注册 ${Object.keys(proxyRoutes).length} 个 API 转发路由`);
|
||||
const n = Object.keys(proxyRoutes).length;
|
||||
// 与 swagger 文档一致:/admin/...、/login/...
|
||||
framework.addRoutes("", proxyRoutes);
|
||||
// 兼容历史调用:/api/admin/...
|
||||
framework.addRoutes("/api", proxyRoutes);
|
||||
console.log(`📡 已注册 ${n} 个转发接口(文档路径 + /api 前缀各一套)`);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user