working commit
This commit is contained in:
+4
-1
@@ -108,6 +108,9 @@ func (hand *Handler) DeleteFile(rctx *router.Context) {
|
||||
func (hand *Handler) ListFiles(rctx *router.Context) {
|
||||
|
||||
filepath, _ := rctx.GetSubpath("filepath")
|
||||
if filepath == "" {
|
||||
filepath = "/"
|
||||
}
|
||||
params := &operator.ListFilesParams{
|
||||
Filepath: filepath,
|
||||
}
|
||||
@@ -119,5 +122,5 @@ func (hand *Handler) ListFiles(rctx *router.Context) {
|
||||
rctx.SetStatus(code)
|
||||
return
|
||||
}
|
||||
rctx.SendJSON(code, res)
|
||||
rctx.SendJSON(code, res.Files)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user