Skip to content

Commit

Permalink
remove pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvik9205 committed Jan 11, 2025
1 parent 9c7e9ad commit c74d71b
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions packages/api-client/src/controllers/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,24 +116,7 @@ export default class WorkspaceController {
request: GetWorkspaceInvitationsRequest,
headers?: Record<string, string>
): Promise<ClientResponse<GetWorkspaceInvitationsResponse>> {
const queryParams = new URLSearchParams({
page: request.page?.toString() || '0',
limit: request.limit?.toString() || '10',
sort: request.sort || '',
order: request.order || '',
search: request.search || ''
})

;[...queryParams.keys()].forEach((key) => {
if (!queryParams.get(key)) {
queryParams.delete(key)
}
})

const url = parsePaginationUrl(
`/api/workspace/invitations?${queryParams.toString()}`,
headers
)
const url = parsePaginationUrl('/api/workspace/invitations', headers)
const response = await this.apiClient.get(url, headers)

return await parseResponse<GetWorkspaceInvitationsResponse>(response)
Expand Down

0 comments on commit c74d71b

Please sign in to comment.