fix: publier les commentaires bokante importés
This commit is contained in:
@@ -37,6 +37,7 @@ async function importBokanteComments({strapi}) {
|
||||
}
|
||||
|
||||
const commentaire = await strapi.documents('api::commentaire.commentaire').create({
|
||||
status: 'published',
|
||||
data: {
|
||||
contenu: stripHtml(status.content),
|
||||
datePublication: status.created_at,
|
||||
@@ -58,6 +59,7 @@ async function importBokanteComments({strapi}) {
|
||||
if (newCommentIds.length > 0) {
|
||||
await strapi.documents('api::parole.parole').update({
|
||||
documentId: parole.documentId,
|
||||
status: 'published',
|
||||
data: {commentaires: {connect: newCommentIds}}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user