Skip to content

Commit

Permalink
remove console.log genouest#555
Browse files Browse the repository at this point in the history
  • Loading branch information
BobLamarley committed Dec 30, 2024
1 parent 4ed8cbf commit be37adb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tools/delete_pending_email_approvals.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ console.log('CONFIG loaded:', CONFIG);

const optionDefinitions = [
{ name: 'help', description: 'Display this usage guide.', alias: 'h', type: Boolean},
{ name: 'days', alias: 'd', type: Number, description: 'Number of days after which to delete accounts' },
{ name: 'config', alias: 'c', type: String, description: 'Path to the configuration file' }
{ name: 'days', alias: 'd', type: Number, description: 'Number of days after which to delete accounts' }
];

const sections = [
Expand All @@ -26,18 +25,13 @@ if(commands.h || (commands.days === undefined)){
return;
}


var db = monk(CONFIG.mongo.host+':'+CONFIG.mongo.port+'/'+CONFIG.general.db);
var users_db = db.get('users');

const DAYS_TO_DELETE = commands.days || 30;
const currentTime = new Date().getTime();
const expirationTime = currentTime - (DAYS_TO_DELETE * 24 * 60 * 60 * 1000);
console.log("current")
console.log(currentTime)
console.log("days to")
console.log(DAYS_TO_DELETE * 24 * 60 * 60 * 1000)
console.log(expirationTime)

async function notify(recipients, subject, message) {
try {
await maisrv.send_notif_mail({
Expand Down

0 comments on commit be37adb

Please sign in to comment.