From cc4892d3c5d96f744a2bc9fd75a127d80a76c834 Mon Sep 17 00:00:00 2001 From: Ns2Kracy Date: Tue, 4 Jun 2024 06:14:21 +0000 Subject: [PATCH] fix folder path --- route/v1/file.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/route/v1/file.go b/route/v1/file.go index cb460a3..044cc1f 100644 --- a/route/v1/file.go +++ b/route/v1/file.go @@ -281,9 +281,8 @@ func GetDownloadSingleFile(ctx echo.Context) error { // @Router /file/dirpath [get] func DirPath(ctx echo.Context) error { var req ListReq - if err := ctx.Bind(&req); err != nil { - return ctx.JSON(common_err.CLIENT_ERROR, model.Result{Success: common_err.CLIENT_ERROR, Message: common_err.GetMsg(common_err.CLIENT_ERROR), Data: err.Error()}) - } + path := ctx.QueryParam("path") + req.Path = path req.Validate() info, err := service.MyService.System().GetDirPath(req.Path) if err != nil {