Skip to content

Promote form changes to Prod #939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 16 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14
20.10.0
10 changes: 6 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const volunteerRouter = require("./routes/api/volunteer");
const roleRouter = require("./routes/api/role");

const app = express();
Services.db.connect(app);
Services.db.connect();

let corsOptions = {};

Expand Down Expand Up @@ -70,7 +70,9 @@ app.use(
name: "session",
keys: [process.env.COOKIE_SECRET],
// Cookie Options
maxAge: 48 * 60 * 60 * 1000 //Logged in for 48 hours
maxAge: 48 * 60 * 60 * 1000, //Logged in for 48 hours
sameSite: process.env.COOKIE_SAME_SITE,
secureProxy: !Services.env.isTest()
})
);
app.use(passport.initialize());
Expand All @@ -89,7 +91,7 @@ Services.log.info("Hacker router activated");
teamRouter.activate(apiRouter);
Services.log.info("Team router activated");
travelRouter.activate(apiRouter);
Services.log.info("Travel router activated")
Services.log.info("Travel router activated");
sponsorRouter.activate(apiRouter);
Services.log.info("Sponsor router activated");
volunteerRouter.activate(apiRouter);
Expand All @@ -113,7 +115,7 @@ app.use((err, req, res, next) => {
const message = err.message ? err.message : "Internal Server Error";
//Only show bad error when we're not in deployment
let errorContents;
if (status === 500 && Services.env.isProduction) {
if (status === 500 && Services.env.isProduction()) {
errorContents = {};
} else if (err.error) {
errorContents = err.error;
Expand Down
6 changes: 1 addition & 5 deletions assets/email/statusEmail/Accepted.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,7 @@
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">hacker
dashboard</a> so we can pass your spot along to someone else.
<br><br>
In the meantime, follow us on <a href="https://facebook.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Facebook</a>,
<a href="https://twitter.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Twitter</a>,
and <a href="https://instagram.com/mcgillhacks"
In the meantime, follow us on <a href="https://instagram.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Instagram</a>
for important updates and news about McHacks! If you have any questions,
feel free to reach out at <a href="mailto:[email protected]"
Expand Down
8 changes: 2 additions & 6 deletions assets/email/statusEmail/Applied.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,10 @@
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">hacker
dashboard</a> until the deadline on <b
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-weight: 700;">January
13th at
3rd at
11:59 PM ET</b>.
<br><br>
In the meantime, follow us on <a href="https://facebook.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Facebook</a>,
<a href="https://twitter.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Twitter</a>,
and <a href="https://instagram.com/mcgillhacks"
In the meantime, follow us on <a href="https://instagram.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Instagram</a>
for important updates and news about McHacks! If you have any questions,
feel free to reach out at <a href="mailto:[email protected]"
Expand Down
8 changes: 2 additions & 6 deletions assets/email/statusEmail/Checked-in.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
This email is to confirm your check-in at McHacks!
<br><br>
Don't forget to join the McHacks participants <a
href="https://discord.com/invite/fqbjr43cKf"
href="https://discord.com/invite/Sa5P8yDgR6"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Discord</a>
for announcements, to chat with other hackers, ask questions, and form
teams!
Expand All @@ -404,11 +404,7 @@


<br><br>
Follow us on <a href="https://facebook.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Facebook</a>,
<a href="https://twitter.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Twitter</a>,
and <a href="https://instagram.com/mcgillhacks"
Follow us on <a href="https://instagram.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Instagram</a>
for important updates and news about McHacks! If you have any questions,
feel free to reach out at <a href="mailto:[email protected]"
Expand Down
6 changes: 1 addition & 5 deletions assets/email/statusEmail/Confirmed.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,7 @@
as excited as we are. Keep an eye out for our week-of email with more
details regarding McHacks. Happy hacking!
<br><br>
Follow us on <a href="https://facebook.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Facebook</a>,
<a href="https://twitter.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Twitter</a>,
and <a href="https://instagram.com/mcgillhacks"
Follow us on <a href="https://instagram.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Instagram</a>
for important updates about McHacks! If you have any questions,
feel free to reach out at <a href="mailto:[email protected]"
Expand Down
6 changes: 1 addition & 5 deletions assets/email/statusEmail/Declined.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,7 @@
unfortunately can't accept everyone. We hope you understand and
encourage you to apply again in the future.
<br><br>
Follow us on <a href="https://facebook.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Facebook</a>,
<a href="https://twitter.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Twitter</a>,
and <a href="https://instagram.com/mcgillhacks"
Follow us on <a href="https://instagram.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Instagram</a>
for important updates about McHacks.
<br><br>
Expand Down
6 changes: 1 addition & 5 deletions assets/email/statusEmail/None.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,7 @@
be sure to
click submit before then to be considered.
<br><br>
In the meantime, follow us on <a href="https://facebook.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Facebook</a>,
<a href="https://twitter.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Twitter</a>,
and <a href="https://instagram.com/mcgillhacks"
In the meantime, follow us on <a href="https://instagram.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Instagram</a>
for important updates and news about McHacks! If you have any questions,
feel free to reach out at <a href="mailto:[email protected]"
Expand Down
19 changes: 10 additions & 9 deletions assets/email/statusEmail/Waitlisted.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -387,18 +387,19 @@
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;">
Hi {{firstName}},
<br><br>
Thank you for applying to McHacks. We received a ton of great
{{!-- Thank you for applying to McHacks. We received a ton of great
applicants this year and are unfortunately unable to offer you a place
at McHacks this year.
at McHacks this year. --}}
Thank you for applying to McHacks. We received a ton of great
applications so far and are unfortunately unable to offer an
acceptance at this time.
<br><br>
But don't sweat yet, we've placed you on the waitlist and will let you
know if a spot opens up!
{{!-- But don't sweat yet, we've placed you on the waitlist and will let you
know if a spot opens up! --}}
But don't sweat yet, we've placed your application among the
others to be considered in the final round of applications.
<br><br>
In the meantime, follow us on <a href="https://facebook.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Facebook</a>,
<a href="https://twitter.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Twitter</a>,
and <a href="https://instagram.com/mcgillhacks"
In the meantime, follow us on <a href="https://instagram.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Instagram</a>
for important updates and news about McHacks! If you have any questions,
feel free to reach out at <a href="mailto:[email protected]"
Expand Down
6 changes: 1 addition & 5 deletions assets/email/statusEmail/Withdrawn.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,7 @@
We're sorry to hear that you won't be able to attend McHacks this year.
😢
<br><br>
Follow us on <a href="https://facebook.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Facebook</a>,
<a href="https://twitter.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Twitter</a>,
and <a href="https://instagram.com/mcgillhacks"
Follow us on <a href="https://instagram.com/mcgillhacks"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">Instagram</a>
for important updates and news about McHacks.
<br><br>
Expand Down
3 changes: 1 addition & 2 deletions constants/role.constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Constants = {
const mongoose = require("mongoose");

const accountRole = {
_id: mongoose.Types.ObjectId("00000000e285ec4f6ec7e5c2"),
_id: new mongoose.Types.ObjectId("00000000e285ec4f6ec7e5c2"),
name: "account",
routes: [
Constants.Routes.authRoutes.login,
Expand Down Expand Up @@ -37,7 +37,6 @@ const hackerRole = {
Constants.Routes.hackerRoutes.patchSelfById,
Constants.Routes.hackerRoutes.patchSelfConfirmationById,
Constants.Routes.hackerRoutes.getSelf,
Constants.Routes.hackerRoutes.postDiscord,

Constants.Routes.travelRoutes.getSelf,
Constants.Routes.travelRoutes.getSelfById,
Expand Down
22 changes: 11 additions & 11 deletions constants/testMongoId.constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

const mongoose = require("mongoose");

const team1Id = mongoose.Types.ObjectId();
const team2Id = mongoose.Types.ObjectId();
const team3Id = mongoose.Types.ObjectId();
const team1Id = new mongoose.Types.ObjectId();
const team2Id = new mongoose.Types.ObjectId();
const team3Id = new mongoose.Types.ObjectId();

const hackerAId = mongoose.Types.ObjectId();
const hackerBId = mongoose.Types.ObjectId();
const hackerCId = mongoose.Types.ObjectId();
const hackerDId = mongoose.Types.ObjectId();
const hackerEId = mongoose.Types.ObjectId();
const hackerFId = mongoose.Types.ObjectId();
const hackerGId = mongoose.Types.ObjectId();
const hackerHId = mongoose.Types.ObjectId();
const hackerAId = new mongoose.Types.ObjectId();
const hackerBId = new mongoose.Types.ObjectId();
const hackerCId = new mongoose.Types.ObjectId();
const hackerDId = new mongoose.Types.ObjectId();
const hackerEId = new mongoose.Types.ObjectId();
const hackerFId = new mongoose.Types.ObjectId();
const hackerGId = new mongoose.Types.ObjectId();
const hackerHId = new mongoose.Types.ObjectId();

module.exports = {
team1Id: team1Id,
Expand Down
4 changes: 2 additions & 2 deletions controllers/auth.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ const Success = require("../constants/success.constant");
module.exports = {
onSuccessfulLogin: function(req, res) {
return res.status(200).json({
message: Success.LOGIN,
message: Success.AUTH_LOGIN,
data: {}
});
},
logout: function(req, res) {
req.logout();
return res.status(200).json({
message: Success.LOGOUT,
message: Success.AUTH_LOGOUT,
data: {}
});
},
Expand Down
Loading
Loading