1
0
Fork 0
mirror of synced 2024-07-04 22:11:23 +12:00

Migrate RowAPI.bulkImport

This commit is contained in:
Sam Rose 2024-03-01 17:12:46 +00:00
parent 02ac338c3f
commit c0907d37ef
No known key found for this signature in database

View file

@ -123,14 +123,12 @@ export class RowAPI extends TestAPI {
bulkImport = async (
tableId: string,
body: BulkImportRequest,
{ expectStatus } = { expectStatus: 200 }
expectations?: Expectations
): Promise<BulkImportResponse> => {
let request = this.request
.post(`/api/tables/${tableId}/import`)
.send(body)
.set(this.config.defaultHeaders())
.expect(expectStatus)
return (await request).body
return await this._post<BulkImportResponse>(`/api/${tableId}/rows/import`, {
body,
expectations,
})
}
search = async (