plugin bugfix
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ pub struct ProcessRequest {
|
|||||||
pub callback_url: String,
|
pub callback_url: String,
|
||||||
pub meta_core_url: String,
|
pub meta_core_url: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub existing_meta: HashMap<String, String>,
|
pub existing_meta: HashMap<String, serde_json::Value>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ impl MetaCoreClient {
|
|||||||
|
|
||||||
/// Set a single property for a hash ID
|
/// Set a single property for a hash ID
|
||||||
pub async fn set_property(&self, hash_id: &str, key: &str, value: &str) -> Result<()> {
|
pub async fn set_property(&self, hash_id: &str, key: &str, value: &str) -> Result<()> {
|
||||||
let url = format!("{}/api/meta/{}/{}", self.base_url, hash_id, key);
|
let url = format!("{}/meta/{}/{}", self.base_url, hash_id, key);
|
||||||
|
|
||||||
for attempt in 1..=MAX_RETRIES {
|
for attempt in 1..=MAX_RETRIES {
|
||||||
match self
|
match self
|
||||||
@@ -84,7 +84,7 @@ impl MetaCoreClient {
|
|||||||
metadata: &HashMap<String, String>,
|
metadata: &HashMap<String, String>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
// Try batch endpoint first
|
// Try batch endpoint first
|
||||||
let url = format!("{}/api/meta/{}", self.base_url, hash_id);
|
let url = format!("{}/meta/{}", self.base_url, hash_id);
|
||||||
|
|
||||||
match self.client.patch(&url).json(metadata).send().await {
|
match self.client.patch(&url).json(metadata).send().await {
|
||||||
Ok(resp) if resp.status().is_success() => {
|
Ok(resp) if resp.status().is_success() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user