use anyhow::Result;
use crate::client::Client;
use crate::config;
use crate::style;
pub async fn run() -> Result<()> {
if let Ok(client) = Client::from_config() {
let _ = client.post_empty("/api/auth/cli/tokens/revoke-current").await;
}
if config::clear()? {
println!("{} Signed out.", style::green("✓"));
} else {
println!("{}", style::dim("Already signed out."));
}
Ok(())
}