mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-02-24 15:05:41 +08:00
show parent path on all views except my-drive
This commit is contained in:
parent
18df57f8ab
commit
e5e1bef3e7
2 changed files with 6 additions and 3 deletions
|
@ -263,13 +263,16 @@ func (fs *FileService) ListFiles(c *gin.Context) (*schemas.FileResponse, *types.
|
|||
|
||||
} else if fileQuery.Op == "search" {
|
||||
|
||||
query.Where("teldrive.get_tsquery(?) @@ teldrive.get_tsvector(name)", fileQuery.Search).
|
||||
Select("*,(select path from teldrive.files as f where f.id = files.parent_id) as parent_path")
|
||||
query.Where("teldrive.get_tsquery(?) @@ teldrive.get_tsvector(name)", fileQuery.Search)
|
||||
|
||||
setOrderFilter(query, &pagingParams, &sortingParams)
|
||||
query.Order(getOrder(sortingParams))
|
||||
}
|
||||
|
||||
if fileQuery.Path == "" {
|
||||
query.Select("*,(select path from teldrive.files as f where f.id = files.parent_id) as parent_path")
|
||||
}
|
||||
|
||||
var results []schemas.FileOut
|
||||
|
||||
query.Scan(&results)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 22e2afa966c7949e8f808de9254351c209347fc1
|
||||
Subproject commit 517b8075217eb9d8ef8e30a4aa8608364850025f
|
Loading…
Reference in a new issue