mirror of
https://github.com/makeplane/plane.git
synced 2026-02-05 13:39:37 -06:00
chore: add proper type for cursor
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user