From cd30e8af780df947e0191d0744187cc7af7006d5 Mon Sep 17 00:00:00 2001 From: xion Date: Fri, 23 May 2025 18:59:34 +0800 Subject: [PATCH] fix --- src/routes-simple/upload.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/routes-simple/upload.ts b/src/routes-simple/upload.ts index cbfdb7a..1235f3b 100644 --- a/src/routes-simple/upload.ts +++ b/src/routes-simple/upload.ts @@ -12,7 +12,6 @@ import { getContainerById } from '@/routes/container/module/get-container-file.t import { router, error, checkAuth, clients, writeEvents } from './router.ts'; import './index.ts'; -const filePath = useFileStore('upload', { needExists: true }); const cacheFilePath = useFileStore('cache-file', { needExists: true }); // curl -X POST http://localhost:4000/api/upload -F "file=@readme.md" // curl -X POST http://localhost:4000/api/upload \ @@ -178,13 +177,13 @@ router.get('/api/container/file/:id', async (req, res) => { res.end(JSON.stringify(container)); }); -router.get('/api/code/version', async (req, res) => { - const version = VERSION; - res.writeHead(200, { - 'Content-Type': 'application/json', - }); - res.end(JSON.stringify({ code: 200, data: { version } })); -}); +// router.get('/api/code/version', async (req, res) => { +// const version = VERSION; +// res.writeHead(200, { +// 'Content-Type': 'application/json', +// }); +// res.end(JSON.stringify({ code: 200, data: { version } })); +// }); export const uploadMiddleware = async (req: http.IncomingMessage, res: http.ServerResponse) => { if (req.url?.startsWith('/api/router')) {