Skip to content

Commit

Permalink
fix: illegal files are not displayed (close #1729)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Sep 20, 2022
1 parent 1ab73e0 commit 9181861
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/quark/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
type Addition struct {
Cookie string `json:"cookie" required:"true"`
driver.RootID
OrderBy string `json:"order_by" type:"select" options:"file_type,file_name,updated_at" default:"file_name"`
OrderBy string `json:"order_by" type:"select" options:"none,file_type,file_name,updated_at" default:"none"`
OrderDirection string `json:"order_direction" type:"select" options:"asc,desc" default:"asc"`
}

Expand Down
4 changes: 3 additions & 1 deletion drivers/quark/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ func (d *Quark) GetFiles(parent string) ([]File, error) {
"pdir_fid": parent,
"_size": strconv.Itoa(size),
"_fetch_total": "1",
"_sort": "file_type:asc," + d.OrderBy + ":" + d.OrderDirection,
}
if d.OrderBy != "none" {
query["_sort"] = "file_type:asc," + d.OrderBy + ":" + d.OrderDirection
}
for {
query["_page"] = strconv.Itoa(page)
Expand Down

0 comments on commit 9181861

Please sign in to comment.