From fecab538ccaf8cafd8e577fd93b1e9edbe409c09 Mon Sep 17 00:00:00 2001 From: Tlamelo Masike Date: Tue, 10 Oct 2023 11:40:28 +0100 Subject: [PATCH 1/2] Update --- .../migrations/updateCommentsReadByEditors.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/eq-author-api/migrations/updateCommentsReadByEditors.js b/eq-author-api/migrations/updateCommentsReadByEditors.js index 307c1d8774..f5b20ed9c3 100644 --- a/eq-author-api/migrations/updateCommentsReadByEditors.js +++ b/eq-author-api/migrations/updateCommentsReadByEditors.js @@ -22,7 +22,15 @@ module.exports = async (questionnaire) => { }); }); - await saveComments(commentsData); + // await saveComments({ + // questionnaireId: commentsData.questionnaireId, + // comments: commentsData.comments, + // }); + + await saveComments({ + questionnaireId: questionnaire.id, + comments: commentsData.comments, + }); return questionnaire; }; From 33f505bd8e38096b4bd1383c78157529964fad38 Mon Sep 17 00:00:00 2001 From: Tlamelo Masike Date: Thu, 12 Oct 2023 11:02:11 +0100 Subject: [PATCH 2/2] Remove comments --- eq-author-api/migrations/updateCommentsReadByEditors.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/eq-author-api/migrations/updateCommentsReadByEditors.js b/eq-author-api/migrations/updateCommentsReadByEditors.js index f5b20ed9c3..22a04f3f3d 100644 --- a/eq-author-api/migrations/updateCommentsReadByEditors.js +++ b/eq-author-api/migrations/updateCommentsReadByEditors.js @@ -22,11 +22,6 @@ module.exports = async (questionnaire) => { }); }); - // await saveComments({ - // questionnaireId: commentsData.questionnaireId, - // comments: commentsData.comments, - // }); - await saveComments({ questionnaireId: questionnaire.id, comments: commentsData.comments,