forge-client: take the token as a string, drop TokenSource and StaticToken
This commit is contained in:
parent
a77131ca3f
commit
6d968c7fe6
1 changed files with 44 additions and 81 deletions
|
|
@ -15,7 +15,7 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use anyhow::{Context, Result, bail};
|
||||
use forge_client::{StaticToken, async_client};
|
||||
use forge_client::async_client;
|
||||
use forgejo_api::structs::RepoSearchQuery;
|
||||
use swarm_secret_client::builder::forge_token_path;
|
||||
use swarm_secret_client::forge;
|
||||
|
|
@ -93,7 +93,7 @@ impl Client {
|
|||
.replace_token(&store, LOGIN, TOKEN_NAME, TOKEN_SCOPES, &listed, &path)
|
||||
.await?;
|
||||
|
||||
async_client(self.url.clone(), &StaticToken::new(&credential.value))
|
||||
async_client(self.url.clone(), &credential.value)
|
||||
.context("building a forge client with the new token")?
|
||||
.repo_search(RepoSearchQuery::default())
|
||||
.await
|
||||
|
|
|
|||
Loading…
Reference in a new issue