From 3f0cf843186864c639236c937171aeb5139efabb Mon Sep 17 00:00:00 2001 From: Andrew Rumble Date: Wed, 9 Oct 2024 10:40:11 +0100 Subject: [PATCH] Convert scripts that use institutions module GitOrigin-RevId: d5819904f746c04fdb63971af93e8f8cc6f9fda8 --- services/web/scripts/process_lapsed_reconfirmations.js | 10 ---------- .../web/scripts/process_lapsed_reconfirmations.mjs | 9 +++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) delete mode 100644 services/web/scripts/process_lapsed_reconfirmations.js create mode 100644 services/web/scripts/process_lapsed_reconfirmations.mjs diff --git a/services/web/scripts/process_lapsed_reconfirmations.js b/services/web/scripts/process_lapsed_reconfirmations.js deleted file mode 100644 index a38af158ad..0000000000 --- a/services/web/scripts/process_lapsed_reconfirmations.js +++ /dev/null @@ -1,10 +0,0 @@ -const InstitutionsReconfirmationHandler = require('../modules/institutions/app/src/InstitutionsReconfirmationHandler') - -InstitutionsReconfirmationHandler.processLapsed() - .then(() => { - process.exit(0) - }) - .catch(error => { - console.error(error) - process.exit(1) - }) diff --git a/services/web/scripts/process_lapsed_reconfirmations.mjs b/services/web/scripts/process_lapsed_reconfirmations.mjs new file mode 100644 index 0000000000..25e0ec1256 --- /dev/null +++ b/services/web/scripts/process_lapsed_reconfirmations.mjs @@ -0,0 +1,9 @@ +import InstitutionsReconfirmationHandler from '../modules/institutions/app/src/InstitutionsReconfirmationHandler.mjs' + +try { + await InstitutionsReconfirmationHandler.processLapsed() + process.exit(0) +} catch (error) { + console.error(error) + process.exit(1) +}