mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
feat: file explorer (#1)
* feat: list volume files backend * feat: file tree component * feat: load sub folders * fix: filetree wrong opening order * temp: open / close icons * chore: remove all hc files when cleaning * chore: file-tree optimizations
This commit is contained in:
@@ -9,7 +9,9 @@ import {
|
||||
getVolumeDto,
|
||||
healthCheckDto,
|
||||
type ListContainersResponseDto,
|
||||
type ListFilesResponseDto,
|
||||
type ListVolumesResponseDto,
|
||||
listFilesDto,
|
||||
listVolumesDto,
|
||||
mountVolumeDto,
|
||||
testConnectionBody,
|
||||
@@ -118,4 +120,16 @@ export const volumeController = new Hono()
|
||||
const { error, status } = await volumeService.checkHealth(name);
|
||||
|
||||
return c.json({ error, status }, 200);
|
||||
})
|
||||
.get("/:name/files", listFilesDto, async (c) => {
|
||||
const { name } = c.req.param();
|
||||
const subPath = c.req.query("path");
|
||||
const result = await volumeService.listFiles(name, subPath);
|
||||
|
||||
const response = {
|
||||
files: result.files,
|
||||
path: result.path,
|
||||
} satisfies ListFilesResponseDto;
|
||||
|
||||
return c.json(response, 200);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user