summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2023-12-11 20:31:52 +0100
committerCyborus <cyborus@cyborus.xyz>2023-12-11 21:52:45 +0100
commita2ff083f715f22a49ebbf3d40aca8373174f5448 (patch)
treec5fe2622a69c2b5ce108cf40026aa3cfcaa7405f /src/lib.rs
parenttest editing release (diff)
downloadforgejo-api-a2ff083f715f22a49ebbf3d40aca8373174f5448.tar.xz
forgejo-api-a2ff083f715f22a49ebbf3d40aca8373174f5448.zip
fix release attachments
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index dea6d44..d133868 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -104,13 +104,13 @@ impl Forgejo {
self.execute(request).await
}
- async fn post_form<T: Serialize, U: DeserializeOwned>(
+ async fn post_multipart<T: DeserializeOwned>(
&self,
path: &str,
- body: &T,
- ) -> Result<U, ForgejoError> {
+ body: reqwest::multipart::Form,
+ ) -> Result<T, ForgejoError> {
let url = self.url.join("api/v1/").unwrap().join(path).unwrap();
- let request = self.client.post(url).form(body).build()?;
+ let request = self.client.post(url).multipart(body).build()?;
self.execute(request).await
}