fix(cli): table delete uses correct route /api/base/{baseId}/table/{tableId}
CLI was sending DELETE /api/table/{tableId} but the only
controller is at api/base/:baseId/table, causing 404.
This commit is contained in:
+3
-2
@@ -68,8 +68,9 @@ export class Client {
|
||||
updateTable(tableId: string, body: unknown) {
|
||||
return this.call<unknown>('PUT', `/api/table/${tableId}`, body);
|
||||
}
|
||||
deleteTable(tableId: string) {
|
||||
return this.call<{ id: string }>('DELETE', `/api/table/${tableId}`);
|
||||
deleteTable(tableId: string, baseId?: string) {
|
||||
const base = baseId ?? this.cfg.baseId;
|
||||
return this.call<{ id: string }>('DELETE', `/api/base/${base}/table/${tableId}`);
|
||||
}
|
||||
|
||||
// ---- field ----
|
||||
|
||||
Reference in New Issue
Block a user