From c22d2cd51d3a6660cd38d264def98cd8db96ae67 Mon Sep 17 00:00:00 2001 From: Vitoria Heliane Date: Mon, 7 Jan 2019 13:33:50 -0300 Subject: [PATCH] Change pagination ttributes type --- node/dataSources/document.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node/dataSources/document.ts b/node/dataSources/document.ts index cdd07073b..c76dc2dff 100644 --- a/node/dataSources/document.ts +++ b/node/dataSources/document.ts @@ -18,10 +18,10 @@ export class DocumentDataSource extends RESTDataSource { { _fields: fields } ) - public searchDocuments = (acronym: string, fields: string[], where: string, { page, pageSize }: PaginationArgs) => this.get( + public searchDocuments = (acronym: string, fields: string[], where: string, pagination: PaginationArgs) => this.get( `${acronym}/search`, { _fields: fields, _where: where }, - { headers: { page, pageSize } } + { headers: { ...pagination } } ) public createDocument = (acronym: string, fields: string[]) => this.post( @@ -50,7 +50,7 @@ export class DocumentDataSource extends RESTDataSource { const pageSize = request.headers.get('pageSize') const formDataHeaders = request.headers.get('formDataHeaders') if (page && pageSize) { - request.headers = withMDPagination()(vtex, cookie)(page, pageSize) + request.headers = withMDPagination()(vtex, cookie)(+page, +pageSize) } else if (formDataHeaders) { request.headers = { 'Proxy-Authorization': this.context.vtex.authToken,