mirror of
https://github.com/sol1/rustguac.git
synced 2026-09-11 13:50:14 +00:00
98b634f438
Prior behaviour: delete_folder only cleared entries and .config of the named folder; subfolder .config keys were left behind. Pre-v1.6.0 that was fine because subfolders didn't exist. Post-subfolders the UI would refresh after delete, list_children would still find the orphaned subfolder markers, and the folder would appear stuck (the DELETE request returned 204, no error surfaced, nothing looked broken except the folder refused to go away). delete_folder now BFS-collects every folder path in the subtree before wiping entries and .config at each level. Return type changes from Result<(), _> to Result<(usize, usize), _> so the endpoint can report (subfolders_deleted, entries_deleted) back to the UI; the single caller in api.rs is updated. UI: confirmation prompt now explicitly mentions "AND all its subfolders and entries" when the selected folder has_children is true, so admins don't nuke a subtree by accident. After a successful delete, a transient banner reports the number of entries (and subfolders when > 0) that got swept up.