fix: fix错误

This commit is contained in:
2025-02-26 01:59:46 +08:00
parent 69721f3944
commit 3477d098b7
14 changed files with 71 additions and 75 deletions

View File

@@ -1,2 +1,3 @@
import { SimpleRouter } from '@kevisual/router/simple';
export const router = new SimpleRouter();
import { useContextKey } from '@kevisual/use-config/context';
export const router = useContextKey('router', () => new SimpleRouter());

View File

@@ -259,5 +259,8 @@ router.get('/api/code/version', async (req, res) => {
});
export const uploadMiddleware = async (req: http.IncomingMessage, res: http.ServerResponse) => {
if (req.url?.startsWith('/api/router')) {
return;
}
return router.parse(req, res);
};