fix
This commit is contained in:
parent
262ef1d118
commit
cd30e8af78
@ -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')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user