Skip to content

Commit

Permalink
fix: getByIds should return paginated results
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloashmore committed May 12, 2021
1 parent 5d563b0 commit fb94561
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ export class Client {
async getByIDs<TDocument extends Document>(
ids: string[],
params?: Partial<BuildQueryURLArgs>,
): Promise<TDocument[]> {
return await this.getAll<TDocument>(
): Promise<Query<TDocument>> {
return await this.get<TDocument>(
appendPredicates(predicate.at('document.id', ids))(params),
)
}
Expand Down Expand Up @@ -740,7 +740,7 @@ export class Client {
previewToken = previewToken || searchParams.get('token') || undefined
} else if (this.httpRequest?.query) {
if (typeof this.httpRequest.query.documentId === 'string') {
documentId = documentId || this.httpRequest?.query?.documentId
documentId = documentId || this.httpRequest.query.documentId
}
if (typeof this.httpRequest.query.token === 'string') {
previewToken = previewToken || this.httpRequest.query.token
Expand Down

0 comments on commit fb94561

Please sign in to comment.