Skip to content

Commit 38c1c11

Browse files
authored
docs: remove outdated res parameter in login and resetPassword operations (#11268)
Fixes #9829 As described in the issue, the `res` parameter does no more exist for these operations. Additionally, marks `req` as an optional property.
1 parent 7922d66 commit 38c1c11

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs/local-api/overview.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,7 @@ const result = await payload.login({
345345
email: 'dev@payloadcms.com',
346346
password: 'rip',
347347
},
348-
req: req, // pass a Request object to be provided to all hooks
349-
res: res, // used to automatically set an HTTP-only auth cookie
348+
req: req, // optional, pass a Request object to be provided to all hooks
350349
depth: 2,
351350
locale: 'en',
352351
fallbackLocale: false,
@@ -384,8 +383,7 @@ const result = await payload.resetPassword({
384383
password: req.body.password, // the new password to set
385384
token: 'afh3o2jf2p3f...', // the token generated from the forgotPassword operation
386385
},
387-
req: req, // pass a Request object to be provided to all hooks
388-
res: res, // used to automatically set an HTTP-only auth cookie
386+
req: req, // optional, pass a Request object to be provided to all hooks
389387
})
390388
```
391389

@@ -399,7 +397,7 @@ const result = await payload.unlock({
399397
// required
400398
email: 'dev@payloadcms.com',
401399
},
402-
req: req, // pass a Request object to be provided to all hooks
400+
req: req, // optional, pass a Request object to be provided to all hooks
403401
overrideAccess: true,
404402
})
405403
```

0 commit comments

Comments
 (0)