mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 00:39:49 +00:00
Update user permission docs to use correct user id
The correct id attribute on a user object is `id`, not `_id`, updating docs where this mistake was written.
This commit is contained in:
parent
46a38fd759
commit
85e1226f85
@ -261,11 +261,11 @@ The `user` object is available to successfully authenticated requests.
|
||||
|
||||
```js
|
||||
create: async ctx => {
|
||||
const { _id } = ctx.state.user;
|
||||
const { id } = ctx.state.user;
|
||||
|
||||
const depositObj = {
|
||||
...ctx.request.body,
|
||||
depositor: _id,
|
||||
depositor: id,
|
||||
};
|
||||
|
||||
const data = await strapi.services.deposit.add(depositObj);
|
||||
|
Loading…
x
Reference in New Issue
Block a user