From 2e1bf68cc077cccdcb654730fabc418c7fc25ce8 Mon Sep 17 00:00:00 2001 From: Bsian Date: Sat, 4 Jan 2020 13:18:22 +0000 Subject: [PATCH] Correct placement --- src/commands/parseall.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/parseall.ts b/src/commands/parseall.ts index d33da59..bd2fe86 100644 --- a/src/commands/parseall.ts +++ b/src/commands/parseall.ts @@ -37,9 +37,9 @@ export default class Parseall extends Command { return parseCertificate(this.client, `${a.homepath}/Validation/${certFile}`); }); - const parsed = await Promise.all(certificates); - const final = search.map((a) => { + const final = search.map(async (a) => { try { + const parsed = await Promise.all(certificates); const { notAfter } = parsed[search.findIndex((acc) => acc === a)]; // @ts-ignore const timeObject: {years: number, months: number, days: number, hours: number, minutes: number, seconds: number, firstDateWasLater: boolean} = moment.preciseDiff(new Date(), notAfter, true);