adds pagination to find

This commit is contained in:
Dan Ribbens
2023-08-09 07:15:26 -04:00
parent 353e851b29
commit 9d7f88c8f7
2 changed files with 42 additions and 24 deletions

View File

@@ -1,6 +1,5 @@
import { CollectionConfig } from '../../src/collections/config/types';
import { buildConfigWithDefaults } from '../buildConfigWithDefaults';
import { devUser } from '../credentials';
export const Posts: CollectionConfig = {
slug: 'posts',
@@ -198,12 +197,10 @@ const config = buildConfigWithDefaults({
},
});
// const findResult = await payload.find({
// collection: 'pages',
// where: { slug: { equals: 'second' } },
// });
// console.log(findResult);
const findResult = await payload.find({
collection: 'pages',
where: { slug: { equals: 'second' } },
});
const person1 = await payload.create({
collection: 'people',