nuxt-modules / nuxt-modules/strapi
Update (PUT) probleme of ID
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 717
- Forks
- 89
- Avg merge
- 7h 3m
- Merged PRs (30d)
- 6
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named. Start by reproducing the update('characters', data.value.documentId, ...) call with the shown mastery payload, then inspect the module's Strapi update entry point and how it handles nested objects containing id fields. Done means determining whether the request is transformed correctly or documenting the supported payload shape.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100