docs: improve naming for afterForgotPassword hook example code (#5062)

This commit is contained in:
Akhil Naidu
2024-03-10 10:52:58 +05:30
committed by Alessio Gravili
parent 045c74ce67
commit b62cb157e1

View File

@@ -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