Use reqwest client with timeout in gitea.rs and bot.rs

This commit is contained in:
2026-06-05 18:48:02 +00:00
parent 01e13f0081
commit 3501e4ae9d
2 changed files with 13 additions and 7 deletions
+1 -4
View File
@@ -8,7 +8,6 @@ use crate::errors::AppError;
pub struct GiteaAPI {
base_url: String,
client: reqwest::Client,
token: String,
}
impl GiteaAPI {
@@ -24,9 +23,7 @@ impl GiteaAPI {
client: reqwest::Client::builder()
.timeout(Duration::from_secs(timeout))
.default_headers(default_headers)
.build()
.unwrap(),
token: String::from(token),
.build()?,
})
}