aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client/src/api_client.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-10 23:12:17 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-10 23:12:17 +0200
commit9eb2ffb2e9b52cdec70acb268e7a12131811db10 (patch)
tree4db12e8f58aee8aba614bab7d5d7803a5807ef0e /crates/atuin-client/src/api_client.rs
parentchore: Remove more (kinda) useless stuff (diff)
downloadatuin-9eb2ffb2e9b52cdec70acb268e7a12131811db10.zip
chore: Somewhat simplify sync code
Diffstat (limited to 'crates/atuin-client/src/api_client.rs')
-rw-r--r--crates/atuin-client/src/api_client.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/crates/atuin-client/src/api_client.rs b/crates/atuin-client/src/api_client.rs
index 066fecb5..ca2fc661 100644
--- a/crates/atuin-client/src/api_client.rs
+++ b/crates/atuin-client/src/api_client.rs
@@ -40,8 +40,6 @@ static APP_USER_AGENT: &str = concat!("atuin/", env!("CARGO_PKG_VERSION"),);
/// authentication across CLI and Hub features.
#[derive(Debug, Clone)]
pub enum AuthToken {
- /// Hub API token, used with "Bearer {token}" header
- Bearer(String),
/// Legacy CLI session token, used with "Token {token}" header
Token(String),
}
@@ -50,7 +48,6 @@ impl AuthToken {
/// Format the token as an Authorization header value
fn to_header_value(&self) -> String {
match self {
- AuthToken::Bearer(token) => format!("Bearer {token}"),
AuthToken::Token(token) => format!("Token {token}"),
}
}
@@ -139,27 +136,6 @@ pub async fn login(address: &str, req: LoginRequest) -> Result<LoginResponse> {
Ok(session)
}
-#[cfg(feature = "check-update")]
-pub async fn latest_version() -> Result<Version> {
- use atuin_common::api::IndexResponse;
-
- ensure_crypto_provider();
- let url = "https://api.atuin.sh";
- let client = reqwest::Client::new();
-
- let resp = client
- .get(url)
- .header(USER_AGENT, APP_USER_AGENT)
- .send()
- .await?;
- let resp = handle_resp_error(resp).await?;
-
- let index = resp.json::<IndexResponse>().await?;
- let version = Version::parse(index.version.as_str())?;
-
- Ok(version)
-}
-
pub fn ensure_version(response: &Response) -> Result<bool> {
let version = response.headers().get(ATUIN_HEADER_VERSION);