Skip to content

Commit 37fe71f

Browse files
eddietejedaclaude
andcommitted
refactor(datasets): rename update() params from label/table_name to description/name
Aligns internal parameter names with the renamed CLI flags introduced in this PR. The API body keys (label, table_name) remain unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8818133 commit 37fe71f

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/datasets.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,23 +208,23 @@ pub fn get(dataset_id: &str, workspace_id: &str, format: &str) {
208208
pub fn update(
209209
dataset_id: &str,
210210
workspace_id: &str,
211-
label: Option<&str>,
212-
table_name: Option<&str>,
211+
description: Option<&str>,
212+
name: Option<&str>,
213213
format: &str,
214214
) {
215-
if label.is_none() && table_name.is_none() {
215+
if description.is_none() && name.is_none() {
216216
eprintln!("error: provide at least one of --description or --name.");
217217
std::process::exit(1);
218218
}
219219

220220
let api = ApiClient::new(Some(workspace_id));
221221

222222
let mut body = json!({});
223-
if let Some(l) = label {
224-
body["label"] = json!(l);
223+
if let Some(d) = description {
224+
body["label"] = json!(d);
225225
}
226-
if let Some(tn) = table_name {
227-
body["table_name"] = json!(tn);
226+
if let Some(n) = name {
227+
body["table_name"] = json!(n);
228228
}
229229

230230
let d: UpdateResponse = api.put(&format!("/datasets/{dataset_id}"), &body);

0 commit comments

Comments
 (0)