From 5fda006b0f974d4ecf85ce850f144a18e79f2db7 Mon Sep 17 00:00:00 2001 From: Cyborus Date: Fri, 26 Apr 2024 12:12:39 -0400 Subject: fix `repo_get_raw_file{_or_lfs}` not returning `Vec` --- src/generated/methods.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/generated/methods.rs b/src/generated/methods.rs index 9cc914f..c2404c9 100644 --- a/src/generated/methods.rs +++ b/src/generated/methods.rs @@ -4309,13 +4309,13 @@ impl crate::Forgejo { repo: &str, filepath: &str, query: RepoGetRawFileOrLfsQuery, - ) -> Result<(), ForgejoError> { + ) -> Result, ForgejoError> { let request = self .get(&format!("repos/{owner}/{repo}/media/{filepath}?{query}")) .build()?; let response = self.execute(request).await?; match response.status().as_u16() { - 200 => Ok(()), + 200 => Ok(response.bytes().await?[..].to_vec()), _ => Err(ForgejoError::UnexpectedStatusCode(response.status())), } } @@ -5235,13 +5235,13 @@ impl crate::Forgejo { repo: &str, filepath: &str, query: RepoGetRawFileQuery, - ) -> Result<(), ForgejoError> { + ) -> Result, ForgejoError> { let request = self .get(&format!("repos/{owner}/{repo}/raw/{filepath}?{query}")) .build()?; let response = self.execute(request).await?; match response.status().as_u16() { - 200 => Ok(()), + 200 => Ok(response.bytes().await?[..].to_vec()), _ => Err(ForgejoError::UnexpectedStatusCode(response.status())), } } -- cgit v1.2.3