🐛 Fixing pagination for "Shared with me"/ES (#778)
This commit is contained in:
@@ -133,6 +133,9 @@ export class DocumentsService {
|
||||
options.sort = this.getSortFieldMapping(options.sort);
|
||||
}
|
||||
|
||||
// Handle pagination differently for non-MongoDB platforms
|
||||
globalResolver.platformServices.search.handlePagination(options);
|
||||
|
||||
const fileList: ListResult<DriveFile> = await this.search(options, context);
|
||||
const result = fileList.getEntities();
|
||||
|
||||
|
||||
@@ -57,12 +57,18 @@ export type SearchDocumentsOptions = {
|
||||
onlyDirectlyShared?: boolean;
|
||||
onlyUploadedNotByMe?: boolean;
|
||||
pagination?: Paginable;
|
||||
nextPage?: {
|
||||
page_token: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type BrowseDocumentsOptions = {
|
||||
filter?: SearchDocumentsBody;
|
||||
sort?: SortType;
|
||||
paginate?: Paginable;
|
||||
nextPage?: {
|
||||
page_token: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type SearchDocumentsBody = {
|
||||
|
||||
@@ -213,6 +213,7 @@ export class DocumentsController {
|
||||
onlyUploadedNotByMe: true,
|
||||
sort: request.body.sort,
|
||||
pagination: request.body.paginate,
|
||||
nextPage: request.body.nextPage,
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user