Change update_file_name to expect a metadata response

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent b402fab697
commit 6929a88c92

@ -1,6 +1,6 @@
[package] [package]
name = "mediarepo-api" name = "mediarepo-api"
version = "0.4.0" version = "0.4.1"
edition = "2018" edition = "2018"
license = "gpl-3" license = "gpl-3"

@ -84,10 +84,12 @@ impl FileApi {
/// Updates a files name /// Updates a files name
#[tracing::instrument(level = "debug", skip(self))] #[tracing::instrument(level = "debug", skip(self))]
pub async fn update_file_name(&self, file_id: FileIdentifier, name: String) -> ApiResult<()> { pub async fn update_file_name(
self.emit("update_file_name", UpdateFileNameRequest { file_id, name }) &self,
.await?; file_id: FileIdentifier,
name: String,
Ok(()) ) -> ApiResult<FileMetadataResponse> {
self.emit_and_get("update_file_name", UpdateFileNameRequest { file_id, name })
.await
} }
} }

Loading…
Cancel
Save