Skip to content

Commit

Permalink
Fix return code in peers API (#3186)
Browse files Browse the repository at this point in the history
Rust compiler found this issue, we were preparing a response and the dropping it and returning a default one
  • Loading branch information
hashmap authored and quentinlesceller committed Jan 21, 2020
1 parent c15aedf commit 4449c91
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions api/src/handlers/peers_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ impl Handler for PeerHandler {
format!("unban failed: {:?}", e),
),
},
_ => return response(StatusCode::BAD_REQUEST, "invalid command"),
};

response(StatusCode::OK, "{}")
_ => response(StatusCode::BAD_REQUEST, "invalid command"),
}
}
}

0 comments on commit 4449c91

Please sign in to comment.