Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions middlewares/hacker.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ function ensureAccountLinkedToHacker(req, res, next) {
if (
hacker &&
req.user &&
String.toString(hacker.accountId) ===
String.toString(req.user.id)
String(hacker.accountId) === String(req.user.id)
) {
return next();
} else {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"start-windows": "set DEBUG=hackboard:* && set NODE_ENV=test && nodemon --ignore gcp_creds.json ./bin/www.js",
"deploy": "NODE_ENV=deployment node ./bin/www.js",
"debug": "DEBUG=hackboard:* NODE_ENV=development nodemon --ignore gcp_creds.json ./bin/www.js",
"test": "DEBUG=hackboard:* NODE_ENV=development mocha -r dotenv/config --reporter spec tests/**.js --exit",
"test-windows": "DEBUG=hackboard:* SET NODE_ENV=development & mocha -r dotenv/config --reporter spec tests/**.js --exit",
"test": "cross-env DEBUG=hackboard:* NODE_ENV=test mocha -r dotenv/config --reporter spec tests/**.js --exit",
"test-windows": "cross-env DEBUG=hackboard:* NODE_ENV=test mocha -r dotenv/config --reporter spec tests/**.js --exit",
"seed": "NODE_ENV=development node ./seed/index.js",
"docs": "apidoc -i ./routes -o ./docs/api/",
"format": "prettier --write '**/*.js'",
Expand Down Expand Up @@ -49,6 +49,7 @@
"apidoc": "^1.2.0",
"chai": "^4.4.1",
"chai-http": "^4.4.0",
"cross-env": "^7.0.3",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
Expand Down
57 changes: 48 additions & 9 deletions services/hacker.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ async function getStatsAllHackersCached() {
.populate({
path: "accountId",
});
const stats = getStats(allHackers);
cache.put(Constants.CACHE_KEY_STATS, stats, Constants.CACHE_TIMEOUT_STATS); //set a time-out of 5 minutes
return getStats(allHackers);
return stats;
}

/**
Expand Down Expand Up @@ -160,6 +161,12 @@ function getStats(hackers) {
const stats = {
total: 0,
status: {},
reviewerStatus: {},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Humor an old alum who saw this in GitHub notifications... I know this isn't what's in the model but seeing this in the diff is triggering me. Shouldn't this be modeled as an object?

reviews: [
    {
        reviewerId: "...", // Reference to the reviewer's account
        status: "Accept",
        comments: "Good experience and a thoughtful application."
    }
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krubenok Thank you for the feedback, alums are always welcome! We'll take a look and fix this.

Apologies for the Github reach-out, but we're currently running into a serious issue with our mchacks.ca domain. As a previous director, we would really appreciate if you could get in touch with us and help us out, as we think this domain was registered during your time at McHacks. Please send me an email at janek170805@gmail.com. Thank you!!

@krubenok krubenok Nov 10, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has all the details I have: hackmcgill/mchacks6@676e119

the account was probably one of the @mchacks.ca ones I no longer have access to for either/both cloudflare and namecheap. Slack archive I still have says maybe devops@mchacks.ca or kyle@mchakcs.ca Somewhere in the zoho email archives probably, maybe the directors aliases too.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to look into this @krubenok. It looks like we don't have any access to deleted/inactive zoho accounts like devops@mchacks.ca or kyle@mchacks.ca.

This is an update on our current situation:

Our mchacks.ca domain's DNS configurations were mysteriously changed on Nov. 6, 2026 and is now parked. We believe at some point over the years the domain registrar was changed from Namecheap to Gandi, and its management has been delegated to AWS, a Gandi reseller. Investigating this requires signing in to our AWS account, but we're currently locked out, since our root email is on the parked mchacks.ca domain and we can't receive the verification code. We've been trying to contact past McHacks members for help, but still haven't found out what account the mchacks.ca domain is registered under. We're hoping AWS support can recover our account and we will continue investigating from there.

If there's anyone you can point us to that may have more information about this please let us know!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 years later I don't have much else to share. I have no idea where the data has gone. All the creds I had for AWS, namecheap and everything else have long since gone stale. I did register the domain back in the day but it' been several renewals since then so I can't speak to where they've ended up since then.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @krubenok, just wanted to update you and let you know that we got the mchacks.ca domain back up! I messaged one of the numbers under the WHOIS lookup for hackmcgill.ca and turns out Chris Dobson (a friend of yours, I believe) had both domains registered in his personal AWS account. He just shut down his account a couple months ago, so that's why our domains were parked. We've since been able to transfer ownership of those domains to our Cloudflare account. Thanks so much for helping us out! I know it’s been a while since your McHacks days haha, so I really appreciate it

reviewerStatus2: {},
reviewerName: {},
reviewerName2: {},
reviewerComments: {},
reviewerComments2: {},
school: {},
degree: {},
gender: {},
Expand All @@ -184,6 +191,35 @@ function getStats(hackers) {
stats.status[hacker.status] = stats.status[hacker.status]
? stats.status[hacker.status] + 1
: 1;
stats.reviewerStatus[hacker.reviewerStatus] = stats.reviewerStatus[
hacker.reviewerStatus
]
? stats.reviewerStatus[hacker.reviewerStatus] + 1
: 1;
stats.reviewerStatus2[hacker.reviewerStatus2] = stats.reviewerStatus2[
hacker.reviewerStatus2
]
? stats.reviewerStatus2[hacker.reviewerStatus2] + 1
: 1;
stats.reviewerName[hacker.reviewerName] = stats.reviewerName[
hacker.reviewerName
]
? stats.reviewerName[hacker.reviewerName] + 1
: 1;
stats.reviewerName2[hacker.reviewerName2] = stats.reviewerName2[
hacker.reviewerName2
]
? stats.reviewerName2[hacker.reviewerName2] + 1
: 1;
stats.reviewerComments[hacker.reviewerComments] = stats.reviewerComments[
hacker.reviewerComments
]
? stats.reviewerComments[hacker.reviewerComments] + 1
: 1;
stats.reviewerComments2[hacker.reviewerComments2] = stats
.reviewerComments2[hacker.reviewerComments2]
? stats.reviewerComments2[hacker.reviewerComments2] + 1
: 1;
stats.school[hacker.application.general.school] = stats.school[
hacker.application.general.school
]
Expand Down Expand Up @@ -221,17 +257,19 @@ function getStats(hackers) {
.jobInterest[hacker.application.general.jobInterest]
? stats.jobInterest[hacker.application.general.jobInterest] + 1
: 1;
stats.fieldOfStudy[hacker.application.general.fieldOfStudy] = stats
.fieldOfStudy[hacker.application.general.fieldOfStudy]
? stats.fieldOfStudy[hacker.application.general.fieldOfStudy] + 1
: 1;
for (const field of hacker.application.general.fieldOfStudy) {
stats.fieldOfStudy[field] = stats.fieldOfStudy[field]
? stats.fieldOfStudy[field] + 1
: 1;
}
stats.graduationYear[hacker.application.general.graduationYear] = stats
.graduationYear[hacker.application.general.graduationYear]
? stats.graduationYear[hacker.application.general.graduationYear] +
1
: 1;
for (const dietaryRestrictions of hacker.accountId
.dietaryRestrictions) {
const dietaryRestrictionsList =
hacker.accountId.dietaryRestrictions || [];
for (const dietaryRestrictions of dietaryRestrictionsList) {
stats.dietaryRestrictions[dietaryRestrictions] = stats
.dietaryRestrictions[dietaryRestrictions]
? stats.dietaryRestrictions[dietaryRestrictions] + 1
Expand All @@ -246,8 +284,9 @@ function getStats(hackers) {
// const age = hacker.accountId.getAge();
// stats.age[age] = stats.age[age] ? stats.age[age] + 1 : 1;

stats.age[hacker.accountId.age] = stats.age[hacker.accountId.age]
? stats.age[age] + 1
const hackerAge = hacker.accountId.age;
stats.age[hackerAge] = stats.age[hackerAge]
? stats.age[hackerAge] + 1
: 1;

const applicationDate = hacker._id
Expand Down
2 changes: 1 addition & 1 deletion tests/hacker.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@ describe("POST add a hacker resume", function() {
});
it("It should SUCCEED and upload a resume for a hacker", function(done) {
//this takes a lot of time for some reason
util.auth.login(agent, noTeamHacker0, (error) => {
util.auth.login(agent, noTeamHackerAccount0, (error) => {
if (error) {
return done(error);
}
Expand Down
Loading