mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 17:29:14 +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
|
```js
|
||||||
create: async ctx => {
|
create: async ctx => {
|
||||||
const { _id } = ctx.state.user;
|
const { id } = ctx.state.user;
|
||||||
|
|
||||||
const depositObj = {
|
const depositObj = {
|
||||||
...ctx.request.body,
|
...ctx.request.body,
|
||||||
depositor: _id,
|
depositor: id,
|
||||||
};
|
};
|
||||||
|
|
||||||
const data = await strapi.services.deposit.add(depositObj);
|
const data = await strapi.services.deposit.add(depositObj);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user