Skip to content

Commit

Permalink
Release v1.2.1 (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdconn00 authored Mar 6, 2024
1 parent 6f12ff1 commit dbe7ee8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions controllers/StatsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ router.get('/ins', getUser, auth(['atm', 'datm', 'ta', 'ins', 'mtr']), async (re
router.get('/activity', getUser, auth(['atm', 'datm', 'ta', 'wm']), async (req, res) => {
try {
const today = L.utc();
const chkDate = today.minus({days: 61});
const chkDate = today.minus({days: 91});
const users = await User.find({member: true}).select('fname lname cid rating oi vis createdAt roleCodes certCodes joinDate').sort({lname: 1}).populate('certifications').lean({virtuals: true});
const activityReduced = {};
const trainingReduced = {};
Expand Down Expand Up @@ -205,7 +205,7 @@ router.get('/activity', getUser, auth(['atm', 'datm', 'ta', 'wm']), async (req,
...user,
totalTime,
totalRequests,
tooLow: totalTime < 7200 && (user.joinDate ?? user.createdAt) < chkDate && !totalRequests,
tooLow: totalTime < 10800 && (user.joinDate ?? user.createdAt) < chkDate && !totalRequests,
protected: user.isStaff || [1167179].includes(user.cid)
}
}
Expand Down
2 changes: 1 addition & 1 deletion helpers/controllerActivityHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let redisLock = RedisLock(redis);
await redis.connect();

const observerRatingCode = 1;
const activityWindowInDays = 60;
const activityWindowInDays = 90;
const gracePeriodInDays = 15;
const requiredHoursPerPeriod = 2;
const redisActivityCheckKey = "ACTIVITYCHECKRUNNING";
Expand Down

0 comments on commit dbe7ee8

Please sign in to comment.