Closed
Description
Link to the documentation page or resource
https://docs.strapi.io/dev-docs/api/document-service/populate#populating-with-update
Describe the bug
The code example is putting the document ID as the first param when it needs to be included in the single object param.
Additional context
Current:
strapi.documents("api::article.article").update("cjld2cjxh0000qzrmn831i7rn", {
data: {
title: "Test Article Update",
},
populate: ["headerImage"],
});
Suggested improvements or fixes
Fixed:
strapi.documents("api::article.article").update({
documentId: "cjld2cjxh0000qzrmn831i7rn",
data: {
title: "Test Article Update",
},
populate: ["headerImage"],
});
Related issue(s)/PR(s)
No response
Metadata
Metadata
Assignees
Labels
No labels