feat: search files across folders
All checks were successful
CI / hygiene (push) Successful in 2s
Build and Deploy / build-and-deploy (push) Successful in 29s
CI / test (push) Successful in 20s

This commit is contained in:
Grendgi
2026-06-18 11:35:38 +03:00
parent 1144b11ca3
commit b75f274885
2 changed files with 71 additions and 2 deletions

View File

@@ -36,7 +36,8 @@ func (h *NodeHandler) List(w http.ResponseWriter, r *http.Request) {
userID := commonmw.GetUserID(r.Context())
scope := r.URL.Query().Get("scope")
parentID := emptyToNil(r.URL.Query().Get("parent_id"))
nodes, err := h.repo.List(r.Context(), userID, subordinates(r), scope, parentID)
query := strings.TrimSpace(r.URL.Query().Get("q"))
nodes, err := h.repo.List(r.Context(), userID, subordinates(r), scope, parentID, query)
if err != nil {
writeInternalError(w, r, err, "failed to list files")
return