在中央直辖区提出请求后,I m:
url: http://localhost:1337/api/users/3
payload: {
"data": {
"role": {
"set": [{"id": 2}]
}
}
}
由于某种原因,我没有更新用户的作用,但我得到全面答复,但Id仍然扮演着以下角色:反应正在逐渐消失,为什么它没有更新用户作用,以及它如何适当发挥作用?
{
"id": 3,
"username": "czlenson",
"email": "[email protected]",
"provider": "local",
"confirmed": true,
"blocked": false,
"createdAt": "2023-04-13T19:46:40.331Z",
"updatedAt": "2023-04-13T20:15:24.804Z",
"role": {
"id": 1,
"name": "Authenticated",
"description": "Default role given to authenticated user.",
"type": "authenticated",
"createdAt": "2023-04-04T05:04:15.336Z",
"updatedAt": "2023-04-13T20:11:24.318Z"
}
}