Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com> Co-authored-by: Alessio Gravili <alessio@gravili.de> Co-authored-by: PatrikKozak <patrik@trbl.design> Co-authored-by: Lucas Blancas <lablancas@gmail.com> Co-authored-by: Stef Gootzen <37367280+stefgootzen@users.noreply.github.com> Co-authored-by: Jarrod Flesch <30633324+JarrodMFlesch@users.noreply.github.com> Co-authored-by: Jessica Chowdhury <67977755+JessChowdhury@users.noreply.github.com> Co-authored-by: PatrikKozak <35232443+PatrikKozak@users.noreply.github.com> Co-authored-by: Greg Willard <Wickett06@gmail.com> Co-authored-by: James Mikrut <james@payloadcms.com> Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com> Co-authored-by: Elliot DeNolf <denolfe@gmail.com> fix: WhereBuilder component does not accept all valid Where queries (#3087) fix: passes in height to resizeOptions upload option to allow height resize (#3171)
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { buildConfigWithDefaults } from '../buildConfigWithDefaults';
|
|
import TransformHooks from './collections/Transform';
|
|
import Hooks, { hooksSlug } from './collections/Hook';
|
|
import NestedAfterReadHooks from './collections/NestedAfterReadHooks';
|
|
import ChainingHooks from './collections/ChainingHooks';
|
|
import Relations from './collections/Relations';
|
|
import AfterOperation from './collections/AfterOperation';
|
|
import Users, { seedHooksUsers } from './collections/Users';
|
|
import ContextHooks from './collections/ContextHooks';
|
|
|
|
export default buildConfigWithDefaults({
|
|
collections: [
|
|
AfterOperation,
|
|
ContextHooks,
|
|
TransformHooks,
|
|
Hooks,
|
|
NestedAfterReadHooks,
|
|
ChainingHooks,
|
|
Relations,
|
|
Users,
|
|
],
|
|
onInit: async (payload) => {
|
|
await seedHooksUsers(payload);
|
|
await payload.create({
|
|
collection: hooksSlug,
|
|
data: {
|
|
check: 'update',
|
|
fieldBeforeValidate: false,
|
|
collectionBeforeValidate: false,
|
|
fieldBeforeChange: false,
|
|
collectionBeforeChange: false,
|
|
fieldAfterChange: false,
|
|
collectionAfterChange: false,
|
|
collectionBeforeRead: false,
|
|
fieldAfterRead: false,
|
|
collectionAfterRead: false,
|
|
},
|
|
});
|
|
},
|
|
});
|