From ae93bd4044f28ee5a1b954139ba111f4a416e8e6 Mon Sep 17 00:00:00 2001 From: "yucheng.chen" Date: Wed, 30 Mar 2022 16:17:29 +0800 Subject: [PATCH] feat: add fields to search results --- http/search.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/http/search.go b/http/search.go index 1c78b781..66c9b106 100644 --- a/http/search.go +++ b/http/search.go @@ -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 { response = append(response, map[string]interface{}{ - "dir": f.IsDir(), - "path": path, + "dir": f.IsDir(), + "path": path, + "modified": f.ModTime(), + "size": f.Size(), }) return nil