Skip to content

Commit

Permalink
Fix review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
git-hulk committed Dec 17, 2024
1 parent f422e43 commit 05cf2dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/api/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func (handler *RaftHandler) UpdatePeer(c *gin.Context) {
} else {
if _, ok := peers[req.ID]; !ok {
helper.ResponseBadRequest(c, errors.New("peer not exists"))
return
}
if len(peers) == 1 {
helper.ResponseBadRequest(c, errors.New("can't remove the last peer"))
Expand Down

0 comments on commit 05cf2dc

Please sign in to comment.