File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { serverLog } from "../main/logger";
44import { initNcmAPI } from "./netease" ;
55import { initUnblockAPI } from "./unblock" ;
66import { initControlAPI } from "./control" ;
7+ import { initQQMusicAPI } from "./qqmusic" ;
78import fastifyCookie from "@fastify/cookie" ;
89import fastifyMultipart from "@fastify/multipart" ;
910import fastifyStatic from "@fastify/static" ;
@@ -46,13 +47,18 @@ const initAppServer = async () => {
4647 name : "ControlAPI" ,
4748 url : "/api/control" ,
4849 } ,
50+ {
51+ name : "QQMusicAPI" ,
52+ url : "/api/qqmusic" ,
53+ } ,
4954 ] ,
5055 } ) ;
5156 } ) ;
5257 // 注册接口
5358 server . register ( initNcmAPI , { prefix : "/api" } ) ;
5459 server . register ( initUnblockAPI , { prefix : "/api" } ) ;
5560 server . register ( initControlAPI , { prefix : "/api" } ) ;
61+ server . register ( initQQMusicAPI , { prefix : "/api" } ) ;
5662 // 启动端口
5763 const port = Number ( process . env [ "VITE_SERVER_PORT" ] || 25884 ) ;
5864 await server . listen ( { port } ) ;
You can’t perform that action at this time.
0 commit comments