diff options
author | Cyborus <cyborus@cyborus.xyz> | 2024-10-16 20:07:59 +0200 |
---|---|---|
committer | Cyborus <cyborus@cyborus.xyz> | 2024-10-16 20:07:59 +0200 |
commit | 6ad77c21915d1c9afc458ce58db2891487ae093f (patch) | |
tree | 3c2ebc7a66733b9e120b9b591f569008b50432d2 /generator | |
parent | Merge pull request 'Clippy Fixes' (#74) from Pi-Cla/forgejo-api:clippy into main (diff) | |
download | forgejo-api-6ad77c21915d1c9afc458ce58db2891487ae093f.tar.xz forgejo-api-6ad77c21915d1c9afc458ce58db2891487ae093f.zip |
feat: update to forgejo 9
Diffstat (limited to 'generator')
-rw-r--r-- | generator/src/methods.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/generator/src/methods.rs b/generator/src/methods.rs index 141fc7d..1f3f697 100644 --- a/generator/src/methods.rs +++ b/generator/src/methods.rs @@ -379,10 +379,7 @@ fn create_method_request( } } ParameterIn::FormData { param: _ } => { - if !body_method.is_empty() { - eyre::bail!("cannot have more than one body parameter"); - } - body_method = format!(".multipart(reqwest::multipart::Form::new().part(\"attachment\", reqwest::multipart::Part::bytes({name}).file_name(\"file\").mime_str(\"*/*\").unwrap()))"); + body_method += &format!(".multipart(reqwest::multipart::Form::new().part(\"attachment\", reqwest::multipart::Part::bytes({name}).file_name(\"file\").mime_str(\"*/*\").unwrap()))"); } } } |