chore: add proper type for cursor

This commit is contained in:
VipinDevelops
2026-01-07 20:21:47 +05:30
parent e7efc31353
commit d2af59e385
2 changed files with 5 additions and 10 deletions

View File

@@ -23,16 +23,11 @@ export class ProjectPageService extends APIService {
async fetchAll(
workspaceSlug: string,
projectId: string,
queries?: Record<string, string | number>,
config = {}
queries?: Record<string, string | number>
): Promise<TPagePaginatedResponse> {
return this.get(
`/api/workspaces/${workspaceSlug}/projects/${projectId}/pages/`,
{
params: queries,
},
config
)
return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/pages/`, {
params: queries,
})
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;

View File

@@ -400,7 +400,7 @@ export class ProjectPageStore implements IProjectPageStore {
} else {
pages = response.results || [];
paginationData = {
nextCursor: response.next_cursor ?? undefined,
nextCursor: response.next_cursor ?? null,
hasNextPage: response.next_page_results ?? false,
totalResults: response.total_results ?? 0,
};