feat: add currently_reading and read and repsonsive menu
This commit is contained in:
@@ -38,12 +38,13 @@ async function request<T>(
|
||||
}
|
||||
}
|
||||
|
||||
export async function listRows<Row>(event: H3Event, tableId: string): Promise<Row[]> {
|
||||
/** All rows of a table. `filters` are Baserow row filters, e.g. `{ filter__read__boolean: true }`. */
|
||||
export async function listRows<Row>(event: H3Event, tableId: string, filters: Fields = {}): Promise<Row[]> {
|
||||
const path = `rows/table/${tableId}/`
|
||||
const rows: Row[] = []
|
||||
for (let page = 1; ; page++) {
|
||||
const { count, results } = await request<RowPage<Row>>(event, path, {
|
||||
query: { user_field_names: true, size: PAGE_SIZE, page }
|
||||
query: { ...filters, user_field_names: true, size: PAGE_SIZE, page }
|
||||
})
|
||||
rows.push(...results)
|
||||
if (rows.length >= count || results.length === 0) return rows
|
||||
|
||||
Reference in New Issue
Block a user