Sfoglia il codice sorgente

refs 117515: remove id from answers to resend

Futa Arai 3 anni fa
parent
commit
c76765a9a8
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      packages/app/src/server/service/questionnaire-cron.ts

+ 4 - 2
packages/app/src/server/service/questionnaire-cron.ts

@@ -72,8 +72,10 @@ class QuestionnaireCronService {
     };
     };
 
 
     const resendQuestionnaireAnswers = async() => {
     const resendQuestionnaireAnswers = async() => {
-      const questionnaireAnswers = await QuestionnaireAnswer.find();
-      const proactiveQuestionnaireAnswers = await ProactiveQuestionnaireAnswer.find();
+      const questionnaireAnswers = await QuestionnaireAnswer.find()
+        .select('-_id -answers._id  -growiInfo._id -userInfo._id');
+      const proactiveQuestionnaireAnswers = await ProactiveQuestionnaireAnswer.find()
+        .select('-_id -growiInfo._id -userInfo._id');
       axios.post(`${growiQuestionnaireServerOrigin}/questionnaire-answer/batch`, { questionnaireAnswers })
       axios.post(`${growiQuestionnaireServerOrigin}/questionnaire-answer/batch`, { questionnaireAnswers })
         .then(async() => {
         .then(async() => {
           await QuestionnaireAnswer.deleteMany();
           await QuestionnaireAnswer.deleteMany();