mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 07:57:21 +08:00
feat: 优化文件搜索体验,close #997
This commit is contained in:
@@ -7,8 +7,15 @@ import (
|
||||
)
|
||||
|
||||
type FileList struct {
|
||||
Path string `json:"path" form:"path" validate:"required|isUnixPath"`
|
||||
Sort string `json:"sort" form:"sort"`
|
||||
Path string `json:"path" form:"path" validate:"required|isUnixPath"`
|
||||
Sort string `json:"sort" form:"sort"`
|
||||
Keyword string `form:"keyword" json:"keyword"`
|
||||
Sub bool `form:"sub" json:"sub"`
|
||||
}
|
||||
|
||||
func (r *FileList) Prepare(req *http.Request) error {
|
||||
r.Sub = cast.ToBool(req.FormValue("sub"))
|
||||
return nil
|
||||
}
|
||||
|
||||
type FilePath struct {
|
||||
@@ -53,14 +60,3 @@ type FileUnCompress struct {
|
||||
File string `form:"file" json:"file" validate:"required|isUnixPath"`
|
||||
Path string `form:"path" json:"path" validate:"required|isUnixPath"`
|
||||
}
|
||||
|
||||
type FileSearch struct {
|
||||
Path string `form:"path" json:"path" validate:"required|isUnixPath"`
|
||||
Keyword string `form:"keyword" json:"keyword" validate:"required"`
|
||||
Sub bool `form:"sub" json:"sub"`
|
||||
}
|
||||
|
||||
func (r *FileSearch) Prepare(req *http.Request) error {
|
||||
r.Sub = cast.ToBool(req.FormValue("sub"))
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user