Fix searching files from the web ui

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

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())

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