refactor: validator调整

This commit is contained in:
meilin.huang
2023-08-04 12:22:21 +08:00
parent c2ee4f9955
commit 3ae7e0de75
9 changed files with 156 additions and 54 deletions

View File

@@ -104,6 +104,7 @@ func (m *MachineFile) GetDirEntry(rc *req.Ctx) {
g := rc.GinCtx
fid := GetMachineFileId(g)
readPath := g.Query("path")
rc.ReqParam = fmt.Sprintf("path: %s", readPath)
if !strings.HasSuffix(readPath, "/") {
readPath = readPath + "/"
@@ -120,7 +121,6 @@ func (m *MachineFile) GetDirEntry(rc *req.Ctx) {
}
sort.Sort(vo.MachineFileInfos(fisVO))
rc.ResData = fisVO
rc.ReqParam = fmt.Sprintf("path: %s", readPath)
}
func (m *MachineFile) GetDirSize(rc *req.Ctx) {