From b4bd898977654d492e8e7760e6b1b0ba25e1f733 Mon Sep 17 00:00:00 2001 From: Julien Perrin Date: Wed, 10 Jul 2024 10:54:27 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20nettoyer=20donn=C3=A9es=20inutiles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/jobs/archive/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/jobs/archive/index.js b/backend/src/jobs/archive/index.js index 2ebaf83cc..807e7aa00 100644 --- a/backend/src/jobs/archive/index.js +++ b/backend/src/jobs/archive/index.js @@ -28,6 +28,10 @@ execute(async ({ db, logger, sendSlackNotification }) => { { _id: avis._id }, { $set: { 'status': 'archived' } } ); + await db.collection('stagiaires').updateOne( + { token: avis.token }, + { $unset: { individu: 1 } } + ); if (res.result.nModified > 0) { stats.archived++; }