From fee376102192dc6f24297a7b11324636ace3a07d Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Tue, 30 Jun 2026 19:27:37 -0400 Subject: feat: admin gui object CRUD is much nicer --- internal/admin/api_drops.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/admin/api_drops.go') diff --git a/internal/admin/api_drops.go b/internal/admin/api_drops.go index 7645d39..0d14841 100644 --- a/internal/admin/api_drops.go +++ b/internal/admin/api_drops.go @@ -13,15 +13,15 @@ import ( func (s *AdminServer) handleDrops(w http.ResponseWriter, r *http.Request) { switch r.Method { case http.MethodGet: - ids, err := listYAMLFiles(s.dataDir, "drops") + tree, err := listYAMLTree(s.dataDir, "drops") if err != nil { writeJSON(w, map[string]any{"error": err.Error()}) return } - if ids == nil { - ids = []string{} + if tree == nil { + tree = &YAMLTree{Root: []string{}, Dirs: map[string][]string{}} } - writeJSON(w, ids) + writeJSON(w, tree) case http.MethodPost: s.createDrop(w, r) -- cgit v1.2.3