fix(cli): search param uses search[] tuple format

The records API requires search[]=value (tuple), not search=value
(string). Without this, the CLI returned 400 'expected tuple, received
string'. Same fix already exists in the workflow getRecords action.
This commit is contained in:
yeuimu
2026-08-07 17:55:03 +00:00
parent e1d6b03a61
commit 6527602272
+4
View File
@@ -106,6 +106,10 @@ export class Client {
});
} else if (typeof v === 'object') {
out[k] = JSON.stringify(v);
} else if (k === 'search' && typeof v === 'string') {
// The records list API expects `search[]=value` (tuple), not a plain
// `search=value` string. https://github.com/colinhacks/zod
out['search[]'] = v;
} else {
out[k] = String(v);
}