feat: add fields to search results
This commit is contained in:
parent
f8dfbf7eee
commit
ae93bd4044
@ -13,8 +13,10 @@ var searchHandler = withUser(func(w http.ResponseWriter, r *http.Request, d *dat
|
|||||||
|
|
||||||
err := search.Search(d.user.Fs, r.URL.Path, query, d, func(path string, f os.FileInfo) error {
|
err := search.Search(d.user.Fs, r.URL.Path, query, d, func(path string, f os.FileInfo) error {
|
||||||
response = append(response, map[string]interface{}{
|
response = append(response, map[string]interface{}{
|
||||||
"dir": f.IsDir(),
|
"dir": f.IsDir(),
|
||||||
"path": path,
|
"path": path,
|
||||||
|
"modified": f.ModTime(),
|
||||||
|
"size": f.Size(),
|
||||||
})
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user