From 6f8104ecb5dd60249ba78b21f48143afd01fa239 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Wed, 28 Oct 2020 20:46:01 -0400 Subject: [PATCH] change expiration dates for scores --- src/api/comm.libraryofcode.org/routes/report.ts | 2 +- src/commands/score.ts | 4 ++-- src/intervals/score.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/comm.libraryofcode.org/routes/report.ts b/src/api/comm.libraryofcode.org/routes/report.ts index ee14cdd..b003802 100644 --- a/src/api/comm.libraryofcode.org/routes/report.ts +++ b/src/api/comm.libraryofcode.org/routes/report.ts @@ -100,7 +100,7 @@ export default class Report extends Route { const inquiries: [{ id?: string, name: string, date: Date }?] = []; if (member.inquiries?.length > 0) { for (const inq of member.inquiries) { - const testDate = (new Date(new Date(inq.date).setHours(2190))); + const testDate = (new Date(new Date(inq.date).setHours(1460))); if (testDate > new Date()) inquiries.push({ id: inq.id, name: inq.name, date: inq.date }); } } diff --git a/src/commands/score.ts b/src/commands/score.ts index b7feaa4..ce0891e 100644 --- a/src/commands/score.ts +++ b/src/commands/score.ts @@ -161,9 +161,9 @@ export default class Score extends Command { } } */ if (score?.inquiries?.length > 0) { - let desc = '__**Hard Inquiries**__\n*These inquiries will fall off your report within 3 months, try to keep your hard inquiries to a minimum. If you want to file a dispute, please DM Ramirez.*\n\n'; + let desc = '__**Hard Inquiries**__\n*These inquiries will fall off your report within 2 months, try to keep your hard inquiries to a minimum. If you want to file a dispute, please DM Ramirez.*\n\n'; score.inquiries.forEach((inq) => { - const testDate = (new Date(new Date(inq.date).setHours(2190))); + const testDate = (new Date(new Date(inq.date).setHours(1460))); // eslint-disable-next-line no-useless-escape if (testDate > new Date()) desc += `${inq.id ? `__[${inq.id}]__\n` : ''}**Department/Service:** ${inq.name.replace(/\*/gmi, '')}\n**Reason:** ${inq.reason}\n**Date:** ${inq.date.toLocaleString('en-us')} ET\n**Expires:** ${moment(testDate).fromNow()} | ${moment(testDate).calendar()}\n\n`; }); diff --git a/src/intervals/score.ts b/src/intervals/score.ts index b697a95..4ce0cc0 100644 --- a/src/intervals/score.ts +++ b/src/intervals/score.ts @@ -144,8 +144,8 @@ export default async function calculateScore(client: Client): Promise 0) { for (const inq of score.inquiries) { - const testDate = (new Date(new Date(inq.date).setHours(2190))); - if (testDate > new Date()) other -= 1.5; + const testDate = (new Date(new Date(inq.date).setHours(1460))); + if (testDate > new Date()) other -= 1.65; } other = Math.floor(other * 1.15); }