Skip to content

Update (PUT) probleme of ID #470

Description

@lecappa

Hello everyone,
After a day of searching, I’m reaching out to the community for help ;-)

I need to perform an update (PUT) on a component with all the data. Nothing unusual.

But when I send my array, I get an ID error.

Error :
{ "data": null, "error": { "status": 400, "name": "ValidationError", "message": "Invalid key id", "details": { "key": "id", "source": "body" } } }

Here’s my code:
const updateData = async () => { await update('characters', data.value.documentId, { mastery: otherClassSkillsMastery.value }); }

And the request body:
{ "data": { "mastery": [ { "description": "eee", "id": 43, "name": "eeee" }, { "description": "e", "id": 44, "name": "eeee" }, { "description": "", "name": "aaa" } ] } }

Yet with Strapi 4, I’ve never had this kind of ID issue before.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions