From b62cb157e19230f06c9355a16804fb781b6c00d4 Mon Sep 17 00:00:00 2001 From: Akhil Naidu Date: Sun, 10 Mar 2024 10:52:58 +0530 Subject: [PATCH] docs: improve naming for afterForgotPassword hook example code (#5062) --- docs/hooks/collections.mdx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/hooks/collections.mdx b/docs/hooks/collections.mdx index 7bc1fb6cf..f895a76ef 100644 --- a/docs/hooks/collections.mdx +++ b/docs/hooks/collections.mdx @@ -292,13 +292,11 @@ For auth-enabled Collections, this hook runs after successful `forgotPassword` o ```ts import { CollectionAfterForgotPasswordHook } from 'payload/types' -const afterLoginHook: CollectionAfterForgotPasswordHook = async ({ - req, // full express request - user, // user being logged in - token, // user token -}) => { - return user -} +const afterForgotPasswordHook: CollectionAfterForgotPasswordHook = async ({ + args, // arguments passed into the operation + context, + collection, // The collection which this hook is being run on +}) => {...} ``` ## TypeScript