最初,消息字段(Strapi 可重復(fù)組件)將如下所示。"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" }]我想向可重復(fù)組件添加另一條消息:"messages":[ { "from": "user2", "text": "happy hello world" } ]當(dāng)我通過 curl 放置它時(shí):curl -i -X PUT \ -H "Content-Type:application/json" \ -d \'{ "messages":[ { "from": "shop", "text": "happy hello world" } ]}' \ 'https://myserver/mes/5f781bdd23e08f001732cdd8'它會(huì)覆蓋之前的消息。如何在不丟失任何先前數(shù)據(jù)的情況下添加其他消息?
如何通過 HTTP 請(qǐng)求在 strapi 中添加可重復(fù)組件
婷婷同學(xué)_
2023-04-14 17:20:39