mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-29 03:33:10 -04:00
Fix searching files from the web ui
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user