Refactor Gitea client and improve issue handling
Update the authorization header format in the Gitea client. Enhance issue details in work package creation and make `number` field public in the `Issue` struct.
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@ impl Client {
|
||||
|
||||
pub async fn get<T: DeserializeOwned>(&self, url: Url) -> Result<T, GeneralError> {
|
||||
let mut headers = HeaderMap::new();
|
||||
headers.append(AUTHORIZATION, self.token.parse()?);
|
||||
headers.append(AUTHORIZATION, format!("token {}", self.token).parse()?);
|
||||
headers.append(ACCEPT, "application/json".parse()?);
|
||||
|
||||
let client = ClientBuilder::new()
|
||||
|
||||
Reference in New Issue
Block a user