Files
NapCatQQ/packages/napcat-webui-backend/src/router/Mirror.ts
T
手瓜一十雪 129d63f66e Add mirror management and selection UI
Introduces backend API and router for mirror management, including latency testing and custom mirror setting. Adds frontend components and controllers for mirror selection, speed testing, and integration into system info and plugin store pages, allowing users to select and test download/list mirrors interactively.
2026-01-29 17:11:59 +08:00

24 lines
544 B
TypeScript

import { Router } from 'express';
import {
GetMirrorListHandler,
SetCustomMirrorHandler,
TestMirrorsSSEHandler,
TestSingleMirrorHandler
} from '@/napcat-webui-backend/src/api/Mirror';
const router: Router = Router();
// 获取镜像列表
router.get('/List', GetMirrorListHandler);
// 设置自定义镜像
router.post('/SetCustom', SetCustomMirrorHandler);
// SSE 实时测速
router.get('/Test/SSE', TestMirrorsSSEHandler);
// 测试单个镜像
router.post('/Test', TestSingleMirrorHandler);
export { router as MirrorRouter };