adds sort to local find operation

This commit is contained in:
James
2020-12-02 15:24:14 -05:00
parent 69582b2e8c
commit 1129711f75
2 changed files with 3 additions and 0 deletions

View File

@@ -12,12 +12,14 @@ export default async function find(options: FindOptions) {
user,
overrideAccess = true,
showHiddenFields,
sort,
} = options;
const collection = this.collections[collectionSlug];
return this.operations.collections.find({
depth,
sort,
page,
limit,
where,

View File

@@ -25,6 +25,7 @@ export type FindOptions = {
where?: { [key: string]: unknown };
depth?: number;
limit?: number;
sort?: string;
};
export type FindResponse = {