Skip to content

Commit 4fa55f8

Browse files
committed
HYPERFLEET-1086 - chore: remove unused httpStatus param from handleSoftDelete
1 parent 9ea61fd commit 4fa55f8

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

pkg/handlers/cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func (h ClusterHandler) SoftDelete(w http.ResponseWriter, r *http.Request) {
169169
},
170170
ErrorHandler: handleError,
171171
}
172-
handleSoftDelete(w, r, cfg, http.StatusAccepted)
172+
handleSoftDelete(w, r, cfg)
173173
}
174174

175175
// ForceDelete permanently removes a cluster that is in Finalizing state.

pkg/handlers/cluster_nodepools.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func (h ClusterNodePoolsHandler) SoftDelete(w http.ResponseWriter, r *http.Reque
135135
ErrorHandler: handleError,
136136
}
137137

138-
handleSoftDelete(w, r, cfg, http.StatusAccepted)
138+
handleSoftDelete(w, r, cfg)
139139
}
140140

141141
// ForceDelete permanently removes a nodepool that is in Finalizing state.

pkg/handlers/framework.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ func handle(w http.ResponseWriter, r *http.Request, cfg *handlerConfig, httpStat
8585

8686
}
8787

88-
func handleSoftDelete(w http.ResponseWriter, r *http.Request, cfg *handlerConfig, httpStatus int) {
88+
func handleSoftDelete(w http.ResponseWriter, r *http.Request, cfg *handlerConfig) {
89+
httpStatus := http.StatusAccepted
8990
if cfg.ErrorHandler == nil {
9091
cfg.ErrorHandler = handleError
9192
}

pkg/handlers/resource_handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (h *ResourceHandler) Delete(w http.ResponseWriter, r *http.Request) {
113113
return presenters.PresentResource(resource), nil
114114
},
115115
}
116-
handleSoftDelete(w, r, cfg, http.StatusAccepted)
116+
handleSoftDelete(w, r, cfg)
117117
}
118118

119119
// --- Nested resource (ByOwner) methods ---
@@ -241,5 +241,5 @@ func (h *ResourceHandler) DeleteByOwner(w http.ResponseWriter, r *http.Request)
241241
return presenters.PresentResource(resource), nil
242242
},
243243
}
244-
handleSoftDelete(w, r, cfg, http.StatusAccepted)
244+
handleSoftDelete(w, r, cfg)
245245
}

0 commit comments

Comments
 (0)