Browse Source

fix: 调试路由加载报错

黄盛发 8 hours ago
parent
commit
c86ff9f353

+ 3 - 7
deno.jsonc

@@ -1,23 +1,19 @@
 {
-  // 与 gongzuo-server 保持一致的关键映射与兼容设置
   "compilerOptions": {
     "allowJs": true,
     "lib": ["deno.window"],
     "strict": false
   },
   "nodeCompat": {
-    "enable": true,    // 启用 Node 兼容模式
-    "require": true,   // 允许 require(部分模块可能用到)
-    "globals": true    // 注入 __dirname 等
+    "enable": true,
+    "require": true,
+    "globals": true
   },
   "imports": {
-    // 统一 Express 版本,确保主应用与子路由使用同一实例
     "express": "npm:express@4.21.2",
-    // Parse 相关引用保持一致
     "parse": "npm:parse@5.3.0",
     "parse/node": "npm:parse@5.3.0/node",
     "parse/lib/node/Parse.js": "npm:parse@5.3.0/lib/node/Parse.js",
-    // 常用 Node/三方依赖映射
     "ali-oss": "npm:ali-oss@6.23.0",
     "parse-server": "npm:parse-server@7.5.4",
     "crypto": "node:crypto",

+ 0 - 1
modules/fmode-tikhub-server/src/api/users.ts

@@ -2,7 +2,6 @@
 import { TikHubClient } from '../client.ts';
 import { 
   SearchUsersParams, 
-  SearchVideosParams,
   GetUserProfileParams, 
   GetUserPostsParams, 
   GetPostCommentsParams,

+ 3 - 2
modules/fmode-tikhub-server/src/mod.ts

@@ -3,7 +3,8 @@
 // export * from './client.ts';
 // export * from './api/users.ts';
 // export * from './api/instagram.ts';
-export * from './routes';
+// export * from './routes';
 
 // Alias export for compatibility with api/routes.ts
-export { createTikHubRouter as createTikHubCustomizeRoutes } from './routes';
+// export { createTikHubRouter as createTikHubCustomizeRoutes } from './routes';
+export { createTikHubCustomizeRoutes as default } from './routes.ts';

+ 1 - 1
modules/fmode-tikhub-server/src/routes.ts

@@ -23,7 +23,7 @@ const asyncHandler = (fn: (req: Request, res: Response, next: NextFunction) => P
  * 创建 TikHub 路由
  * @param config 可选配置,用于初始化 TikHubClient
  */
-export const createTikHubRouter = (config?: TikHubConfig) => {
+export const createTikHubCustomizeRoutes = (config?: TikHubConfig) => {
   const router = Router();
   
   // 单例 Client (或者根据请求创建,如果需要动态配置)