|
@@ -54,6 +54,7 @@ import paymentRoutes from './modules/payment/payment.controller';
|
|
|
import historyRoutes from './modules/history/history.controller';
|
|
import historyRoutes from './modules/history/history.controller';
|
|
|
import historyBatchRoutes from './modules/history/history-batch.controller';
|
|
import historyBatchRoutes from './modules/history/history-batch.controller';
|
|
|
import feedbackRoutes from './modules/feedback/feedback.controller';
|
|
import feedbackRoutes from './modules/feedback/feedback.controller';
|
|
|
|
|
+import queueRoutes from './modules/queue/queue.controller';
|
|
|
import { initializePlans } from './modules/subscription/subscription.service';
|
|
import { initializePlans } from './modules/subscription/subscription.service';
|
|
|
import { initWebSocket } from './services/websocket.service.js';
|
|
import { initWebSocket } from './services/websocket.service.js';
|
|
|
|
|
|
|
@@ -94,6 +95,9 @@ app.use(mount('/videos', serve(path.join(process.cwd(), 'public', 'videos'))));
|
|
|
// 静态文件服务 - 音色试听样本
|
|
// 静态文件服务 - 音色试听样本
|
|
|
app.use(mount('/tts/voices', serve(path.join(process.cwd(), '..', 'voices'))));
|
|
app.use(mount('/tts/voices', serve(path.join(process.cwd(), '..', 'voices'))));
|
|
|
|
|
|
|
|
|
|
+// 静态文件服务 - 管理后台页面
|
|
|
|
|
+app.use(mount('/admin', serve(path.join(process.cwd(), 'public', 'admin'))));
|
|
|
|
|
+
|
|
|
// 健康检查
|
|
// 健康检查
|
|
|
router.get('/health', (ctx) => {
|
|
router.get('/health', (ctx) => {
|
|
|
ctx.body = { code: 0, message: 'ok', data: { status: 'healthy' } };
|
|
ctx.body = { code: 0, message: 'ok', data: { status: 'healthy' } };
|
|
@@ -131,6 +135,7 @@ router.use('/api/subscription', subscriptionRoutes.routes());
|
|
|
router.use('/api/payment', paymentRoutes.routes());
|
|
router.use('/api/payment', paymentRoutes.routes());
|
|
|
router.use('/api/publish', publishRoutes.routes());
|
|
router.use('/api/publish', publishRoutes.routes());
|
|
|
router.use('/api/feedback', feedbackRoutes.routes());
|
|
router.use('/api/feedback', feedbackRoutes.routes());
|
|
|
|
|
+router.use('/api/queue', queueRoutes.routes());
|
|
|
router.use('/api', logRoutes.routes());
|
|
router.use('/api', logRoutes.routes());
|
|
|
|
|
|
|
|
app.use(router.routes()).use(router.allowedMethods());
|
|
app.use(router.routes()).use(router.allowedMethods());
|