Skip to content

Commit

Permalink
feat: nettoyer données inutiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Perrin committed Jul 10, 2024
1 parent 90a9c9b commit b4bd898
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/src/jobs/archive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down

0 comments on commit b4bd898

Please sign in to comment.