update log to just highlight when the menagedone in token is done

This commit is contained in:
philc 2024-12-24 13:17:53 +01:00
parent 2444455e08
commit 4b78f52e8c

View File

@ -42,9 +42,10 @@ const isAuthenticated = async (req, res, next) => {
let menagedone = fs.existsSync(
`../adminapi/tmp/tokens/menagedone${currentday}`
);
if (menagedone) console.log(Date.now(),`menagedone${currentday} was it done today?:${menagedone}`);
//if (menagedone) console.log(Date.now(),`menagedone${currentday} was it done today?:${menagedone}`);
if (!menagedone) {
// clean oldest
console.log(Date.now(),`menagedone${currentday} will be done now`)
const tsday = dayjs().valueOf(); // now in timestamp format
glob.sync(`../adminapi/tmp/tokens/menagedone*`).forEach((f) => {
fs.removeSync(f);