|
|
@@ -26,7 +26,7 @@ try {
|
|
|
));
|
|
|
} catch (e) {
|
|
|
console.warn("[API Routes] CDN 加载失败, 使用本地模块回退", e);
|
|
|
- // ({ createSpApiRouter } = await import("../modules/fmode-amazon-sp-api/src/mod.ts"));
|
|
|
+ ({ createSpApiRouter } = await import("../modules/fmode-amazon-sp-api/src/mod.ts"));
|
|
|
}
|
|
|
|
|
|
// 本地开发模式加载
|
|
|
@@ -42,11 +42,11 @@ try {
|
|
|
));
|
|
|
} catch (e) {
|
|
|
console.warn("[API Routes] CDN 加载失败, 使用本地模块回退", e);
|
|
|
- // ({ createSorftimeRouter } = await import('../modules/fmode-sorftime-api/src/mod.ts'));
|
|
|
+ ({ createSorftimeRouter } = await import('../modules/fmode-sorftime-api/src/mod.ts'));
|
|
|
}
|
|
|
|
|
|
router.use('/sorftime', createSorftimeRouter({
|
|
|
- token: 'BasicAuth nlbuzstvrkwyadzyee5kwfrtqkc4zz09',
|
|
|
+ token: 'BasicAuth dllfb0npquu1rgqwcw9yb0uynndwzz09',
|
|
|
}));
|
|
|
|
|
|
let createTikHubRoutes;
|
|
|
@@ -56,9 +56,10 @@ try {
|
|
|
));
|
|
|
} catch (e) {
|
|
|
console.warn("[API Routes] CDN 加载失败, 使用本地模块回退", e);
|
|
|
- // ({ createTikHubRoutes } = await import('../modules/fmode-tikhub-api/src/mod.ts'));
|
|
|
+ ({ createTikHubRoutes } = await import('../modules/fmode-tikhub-api/src/mod.ts'));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
router.use(
|
|
|
'/tikhub',
|
|
|
createTikHubRoutes({
|
|
|
@@ -66,40 +67,6 @@ router.use(
|
|
|
apiKey: 'tKIbAsEM8X+GmE2vHqGW7D/ICwK1Q5V4viKFrWiPB6HholGdLFqZJmmyNw=='
|
|
|
})
|
|
|
);
|
|
|
-
|
|
|
-
|
|
|
-/* 已清洗的社媒接口 */
|
|
|
-// let createTikHubCustomizeRoutes;
|
|
|
-// try {
|
|
|
-// ({ createTikHubCustomizeRoutes } = await globalThis.loadModule(
|
|
|
-// 'https://repos.fmode.cn/x/fmode-tikhub-api-customize/0.0.3/fmode-tikhub-api-customize.min.js?code=xxxxxxx'
|
|
|
-// ));
|
|
|
-// } catch (e) {
|
|
|
-// console.warn("[API Routes] CDN 加载失败, 使用本地模块回退", e);
|
|
|
-// // ({ createTikHubCustomizeRoutes } = await import('../modules/fmode-tikhub-server/src/mod.ts'));
|
|
|
-// }
|
|
|
-
|
|
|
-// router.use(
|
|
|
-// '/tikhub/customize',
|
|
|
-// createTikHubCustomizeRoutes({
|
|
|
-// serverURL: 'https://api.tikhub.io/api/v1',
|
|
|
-// apiKey: 'tKIbAsEM8X+GmE2vHqGW7D/ICwK1Q5V4viKFrWiPB6HholGdLFqZJmmyNw=='
|
|
|
-// })
|
|
|
-// );
|
|
|
-
|
|
|
-
|
|
|
-// let createPinterestRouter;
|
|
|
-// try {
|
|
|
-// ({ createPinterestRouter } = await globalThis.loadModule(
|
|
|
-// 'https://repos.fmode.cn/x/fmode-brightdata-api/0.0.1/fmode-brightdata-api.min.js?code=xxxxxxx'
|
|
|
-// ));
|
|
|
-// } catch (e) {
|
|
|
-// console.warn("[API Routes] CDN 加载失败, 使用本地模块回退", e);
|
|
|
-// // ({ createPinterestRouter } = await import('../modules/fmode-brightdata-server/src/mod.ts'));
|
|
|
-// }
|
|
|
-
|
|
|
-// router.use('/pinterest', createPinterestRouter());
|
|
|
-
|
|
|
router.get('/', (req, res) => {
|
|
|
res.json({
|
|
|
message: 'API Routes Loaded Successfully',
|
|
|
@@ -111,9 +78,7 @@ router.get('/', (req, res) => {
|
|
|
'/api/sorftime',
|
|
|
'/api/sorftime/test',
|
|
|
'/api/tikhub',
|
|
|
- '/api/tikhub/health',
|
|
|
- // '/api/pinterest',
|
|
|
- // '/api/pinterest/search'
|
|
|
+ '/api/tikhub/health'
|
|
|
]
|
|
|
});
|
|
|
});
|