test index update

This commit is contained in:
mpostma
2021-02-18 20:28:10 +01:00
parent 68692a256e
commit 4c5effe714
5 changed files with 29 additions and 20 deletions

View File

@ -24,4 +24,13 @@ impl Index<'_> {
});
self.service.post("/indexes", body).await
}
pub async fn update(&self, primary_key: Option<&str>) -> (Value, StatusCode) {
let body = json!({
"primaryKey": primary_key,
});
let url = format!("/indexes/{}", self.uid);
self.service.put(url, body).await
}
}