-
Notifications
You must be signed in to change notification settings - Fork 87
Description
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.