feat: added beforeLogin hook (#1289)

This commit is contained in:
Daniel Söderling
2022-10-24 18:05:12 +02:00
committed by GitHub
parent a9f2f0ec03
commit 09d793926d
7 changed files with 89 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ import TransformHooks from './collections/Transform';
import Hooks, { hooksSlug } from './collections/Hook';
import NestedAfterReadHooks from './collections/NestedAfterReadHooks';
import Relations from './collections/Relations';
import Users, { seedHooksUsers } from './collections/Users';
export default buildConfig({
collections: [
@@ -10,8 +11,10 @@ export default buildConfig({
Hooks,
NestedAfterReadHooks,
Relations,
Users,
],
onInit: async (payload) => {
await seedHooksUsers(payload);
await payload.create({
collection: hooksSlug,
data: {