mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-02-23 13:07:56 +00:00
24 lines
510 B
TypeScript
24 lines
510 B
TypeScript
![]() |
import { getClient } from "../../client";
|
||
|
import { faker } from "@faker-js/faker";
|
||
|
import { Database } from "./database";
|
||
|
import { User } from "../user";
|
||
|
|
||
|
export class Table {
|
||
|
constructor(
|
||
|
public id: number,
|
||
|
public name: string,
|
||
|
public database: Database
|
||
|
) {}
|
||
|
}
|
||
|
|
||
|
export async function updateRows(
|
||
|
user: User,
|
||
|
table: Table,
|
||
|
rowValues: any
|
||
|
): Promise<void> {
|
||
|
await getClient(user).patch(
|
||
|
`database/rows/table/${table.id}/batch/?user_field_names=true`,
|
||
|
{ items: rowValues }
|
||
|
);
|
||
|
}
|