fix: fix错误
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user