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
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
use std::time::Duration;
|
||||
|
||||
use forge_client::{StaticToken, TimeoutPolicy};
|
||||
use forge_client::TimeoutPolicy;
|
||||
use forgejo_api::structs::{NotifyGetListQuery, NotifyReadThreadQuery};
|
||||
use forgejo_api::{Forgejo, ForgejoError};
|
||||
use hive_forge_notify::notify::{HTTP_TIMEOUT_SECS, UNREAD_FETCH_LIMIT};
|
||||
|
|
@ -38,7 +38,7 @@ impl ForgejoSource {
|
|||
return None;
|
||||
}
|
||||
};
|
||||
match forge_client::async_client(parsed, &StaticToken::new(token)) {
|
||||
match forge_client::async_client(parsed, token) {
|
||||
Ok(forge) => Some(Self {
|
||||
forge: Box::new(forge),
|
||||
base_url: base_url.to_owned(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue