Fix command to update the file name returning nothing

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

@ -72,11 +72,16 @@ pub async fn read_thumbnail(
}
#[tauri::command]
pub async fn update_file_name(api_state: ApiAccess<'_>, id: i64, name: String) -> PluginResult<()> {
pub async fn update_file_name(
api_state: ApiAccess<'_>,
id: i64,
name: String,
) -> PluginResult<FileMetadataResponse> {
let api = api_state.api().await?;
api.file
let metadata = api
.file
.update_file_name(FileIdentifier::ID(id), name)
.await?;
Ok(())
Ok(metadata)
}

Loading…
Cancel
Save