fix: return empty arrays instead of null in listPartitions, listVolumes, handleDiskVolumes

This commit is contained in:
2026-06-22 04:52:55 -07:00
parent 190c79487f
commit ebce8fded8
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -334,7 +334,7 @@ func handleDiskVolumes(w http.ResponseWriter, r *http.Request) {
writeJSON(w, map[string]any{"error": err.Error()})
return
}
var filtered []volInfo
filtered := []volInfo{}
for _, v := range vols {
if v.Part == part {
filtered = append(filtered, v)