working commit

This commit is contained in:
2026-02-11 13:47:10 +02:00
parent 75bd5a952b
commit 2e3dbe8f7c
8 changed files with 101 additions and 25 deletions
+4 -1
View File
@@ -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)
}
-3
View File
@@ -10,8 +10,6 @@
package handler
import (
"net/http"
"mstore/app/operator"
"mstore/app/router"
)
@@ -19,6 +17,5 @@ import (
func (hand *Handler) SendHello(rctx *router.Context) {
params := &operator.SendHelloParams{}
res, _ := hand.oper.SendHello(params)
rctx.SetStatus(http.StatusOK)
hand.SendResult(rctx, res)
}