Skip to content

Commit aa8ecb7

Browse files
Add pagination to domain records list
1 parent caf4a0a commit aa8ecb7

File tree

1 file changed

+5
-1
lines changed
  • src/routes/(console)/organization-[organization]/domains/domain-[domain]

1 file changed

+5
-1
lines changed

src/routes/(console)/organization-[organization]/domains/domain-[domain]/+page.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { pageToOffset } from '$lib/helpers/load';
44
import { getLimit } from '$lib/helpers/load';
55
import { getPage } from '$lib/helpers/load';
66
import { sdk } from '$lib/stores/sdk.js';
7+
import { Query } from '@appwrite.io/console';
78

89
export const load = async ({ parent, depends, url, route }) => {
910
depends(Dependencies.DOMAIN);
@@ -15,7 +16,10 @@ export const load = async ({ parent, depends, url, route }) => {
1516

1617
return {
1718
domain,
18-
recordList: await sdk.forConsole.domains.listRecords(domain.$id),
19+
recordList: await sdk.forConsole.domains.listRecords(domain.$id, [
20+
Query.offset(offset),
21+
Query.limit(limit)
22+
]),
1923
offset,
2024
limit
2125
};

0 commit comments

Comments
 (0)