最初,消息字段(Strapi 可重復組件)將如下所示。"messages":[ { "from": "user1", "_id": "5f787348628eea0017b49f7e", "text": "happy hello world", "createdAt": "2020-10-03T12:49:12.052Z", "updatedAt": "2020-10-03T12:49:12.052Z", "__v": 0, "id": "5f787348628eea0017b49f7e" }]我想向可重復組件添加另一條消息:"messages":[ { "from": "user2", "text": "happy hello world" } ]當我通過 curl 放置它時:curl -i -X PUT \ -H "Content-Type:application/json" \ -d \'{ "messages":[ { "from": "shop", "text": "happy hello world" } ]}' \ 'https://myserver/mes/5f781bdd23e08f001732cdd8'它會覆蓋之前的消息。如何在不丟失任何先前數據的情況下添加其他消息?
如何通過 HTTP 請求在 strapi 中添加可重復組件
婷婷同學_
2023-04-14 17:20:39