tfcli: hotfix: fix host blocking
This commit is contained in:
parent
2e214ba8fe
commit
9f938ea8eb
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "tfcli"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
edition = "2021"
|
||||
description = "Command-line client for managing trifid-api"
|
||||
license = "GPL-3.0-or-later"
|
||||
|
|
|
@ -405,7 +405,7 @@ pub async fn block_host(id: String, server: Url) -> Result<(), Box<dyn Error>> {
|
|||
|
||||
let token = format!("{} {}", session_token, auth_token);
|
||||
|
||||
let res = client.post(server.join(&format!("/v1/hosts/{}/block", id))?).bearer_auth(token).send().await?;
|
||||
let res = client.post(server.join(&format!("/v1/hosts/{}/block", id))?).header("Content-Length", "0").bearer_auth(token).send().await?;
|
||||
|
||||
if res.status().is_success() {
|
||||
println!("Host blocked. To unblock it, re-enroll the host.");
|
||||
|
|
Loading…
Reference in New Issue