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:
@@ -106,6 +106,10 @@ export class Client {
|
|||||||
});
|
});
|
||||||
} else if (typeof v === 'object') {
|
} else if (typeof v === 'object') {
|
||||||
out[k] = JSON.stringify(v);
|
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 {
|
} else {
|
||||||
out[k] = String(v);
|
out[k] = String(v);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user