From aacf79f338b1bfd820eb5bf4894f03eb7e10b6e0 Mon Sep 17 00:00:00 2001 From: celebrateyang Date: Sun, 8 Jun 2025 09:15:53 +0800 Subject: [PATCH] fix api syntax error --- api/src/core/api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/core/api.js b/api/src/core/api.js index a6d626bc..5358ab02 100644 --- a/api/src/core/api.js +++ b/api/src/core/api.js @@ -310,7 +310,10 @@ export const runAPI = async (express, app, __dirname, isPrimary = true) => { streamInfo.range = req.headers['range']; } - return stream(res, streamInfo); }); app.get('/', (_, res) => { + return stream(res, streamInfo); + }); + + app.get('/', (_, res) => { res.type('json'); res.status(200).send(env.envFile ? getServerInfo() : serverInfo); })