Change all tags request back to accept content descriptors

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

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

@ -63,10 +63,10 @@ impl TagApi {
/// Returns a list of all tags that are assigned to the list of files
#[tracing::instrument(level = "debug", skip_all)]
pub async fn get_tags_for_files(&self, ids: Vec<i64>) -> ApiResult<Vec<TagResponse>> {
pub async fn get_tags_for_files(&self, cds: Vec<String>) -> ApiResult<Vec<TagResponse>> {
self.emit_and_get(
"tags_for_files",
GetFilesTagsRequest { ids },
GetFilesTagsRequest { cds },
Some(Duration::from_secs(10)),
)
.await

@ -32,11 +32,11 @@ pub async fn get_tags_for_file(
#[tauri::command]
pub async fn get_tags_for_files(
ids: Vec<i64>,
cds: Vec<String>,
api_state: ApiAccess<'_>,
) -> PluginResult<Vec<TagResponse>> {
let api = api_state.api().await?;
let tags = api.tag.get_tags_for_files(ids).await?;
let tags = api.tag.get_tags_for_files(cds).await?;
Ok(tags)
}

@ -26,7 +26,7 @@ pub struct GetFileTagsRequest {
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct GetFilesTagsRequest {
pub ids: Vec<i64>,
pub cds: Vec<String>,
}
#[derive(Clone, Debug, Serialize, Deserialize)]

Loading…
Cancel
Save