mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 16:47:24 +08:00
fix refactoring error
This commit is contained in:
@@ -86,14 +86,14 @@ func (vs *VolumeServer) DeleteHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
count = chunkManifest.Size
|
count = chunkManifest.Size
|
||||||
}
|
}
|
||||||
|
|
||||||
ret := topology.ReplicatedDelete(vs.GetMasterNode(), vs.store, volumeId, n, r)
|
_, err := topology.ReplicatedDelete(vs.GetMasterNode(), vs.store, volumeId, n, r)
|
||||||
|
|
||||||
if ret != 0 {
|
if err == nil {
|
||||||
m := make(map[string]int64)
|
m := make(map[string]int64)
|
||||||
m["size"] = count
|
m["size"] = count
|
||||||
writeJsonQuiet(w, r, http.StatusAccepted, m)
|
writeJsonQuiet(w, r, http.StatusAccepted, m)
|
||||||
} else {
|
} else {
|
||||||
writeJsonError(w, r, http.StatusInternalServerError, errors.New("Deletion Failed."))
|
writeJsonError(w, r, http.StatusInternalServerError, fmt.Errorf("Deletion Failed: %v", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user