fix inquiry OS modifications

merge-requests/25/merge
Matthew 2021-04-11 15:55:02 -04:00
parent cb11be7602
commit e4a63cbf30
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 3 additions and 1 deletions

View File

@ -156,7 +156,9 @@ export default async function calculateScore(client: Client): Promise<NodeJS.Tim
else cloudServices = Math.floor(positives * 0.61);
}
if (score.inquiries?.length > 0) {
const inquiries = await client.db.Inquiry.find({ userID: member.user.id }).lean().exec();
if (inquiries?.length > 0) {
for (const inq of score.inquiries) {
const testDate = (new Date(new Date(inq.date).setHours(1460)));
if (testDate > new Date()) other -= 1.65;