diff --git a/mediarepo-api/Cargo.toml b/mediarepo-api/Cargo.toml index 5ee8df6..9df85dc 100644 --- a/mediarepo-api/Cargo.toml +++ b/mediarepo-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mediarepo-api" -version = "0.4.0" +version = "0.4.1" edition = "2018" license = "gpl-3" diff --git a/mediarepo-api/src/client_api/file.rs b/mediarepo-api/src/client_api/file.rs index 257c634..e3fb0ed 100644 --- a/mediarepo-api/src/client_api/file.rs +++ b/mediarepo-api/src/client_api/file.rs @@ -84,10 +84,12 @@ impl FileApi { /// Updates a files name #[tracing::instrument(level = "debug", skip(self))] - pub async fn update_file_name(&self, file_id: FileIdentifier, name: String) -> ApiResult<()> { - self.emit("update_file_name", UpdateFileNameRequest { file_id, name }) - .await?; - - Ok(()) + pub async fn update_file_name( + &self, + file_id: FileIdentifier, + name: String, + ) -> ApiResult { + self.emit_and_get("update_file_name", UpdateFileNameRequest { file_id, name }) + .await } }