Fix searching files from the web ui

This commit is contained in:
André Duffeck committed 2022-04-22 14:34:04 +02:00
1 parent ca29517527
commit fe61ef58e6
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ func (g Webdav) Search(w http.ResponseWriter, r *http.Request) {
ctx := revactx.ContextSetToken(r.Context(), t)
ctx = metadata.Set(ctx, revactx.TokenHeader, t)
rsp, err := g.searchClient.Search(ctx, &searchsvc.SearchRequest{
Query: rep.SearchFiles.Search.Pattern,
Query: "*" + rep.SearchFiles.Search.Pattern + "*",
})
if err != nil {
e := merrors.Parse(err.Error())
+1 -1
View File
@@ -75,7 +75,7 @@ func NewService(opts ...Option) (Service, error) {
r.Get("/remote.php/dav/public-files/{token}/*", svc.PublicThumbnail)
r.Head("/remote.php/dav/public-files/{token}/*", svc.PublicThumbnailHead)
r.MethodFunc("REPORT", "/remote.php/dav/files/{id}", svc.Search)
r.MethodFunc("REPORT", "/remote.php/dav/files/{id}/*", svc.Search)
})
return svc, nil