display folders and files into

This commit is contained in:
m
2026-07-13 17:09:39 +02:00
parent 04b6dfc6d4
commit 93100a2b81
4 changed files with 24 additions and 5 deletions
+10
View File
@@ -242,3 +242,13 @@ func (h *FileHandler) CreateFolder(c *gin.Context) {
api.Success(c, folder)
}
func (h *FileHandler) ListFilesByParent(c *gin.Context) {
parentID := c.Param("id")
files, err := h.files.ListFilesByParentID(parentID)
if err != nil {
api.Error(c, http.StatusInternalServerError, "DB_ERROR", "Failed to list files in folder")
return
}
api.Success(c, files)
}