File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
1212- Add email blast marketing email
1313- Add 3 days left marketing email
14+ - Add check to ensure application creation deadline has not passed yet
1415
1516### Fixed
1617
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ const HACKER_STATUSES = [
2525 HACKER_STATUS_CHECKED_IN ,
2626 HACKER_STATUS_DECLINED
2727] ;
28+ // This date is Jan 3, 2020 11:59:59PM EST
29+ const APPLICATION_CLOSE_TIME = 1578070799000 ;
2830
2931const SAMPLE_DIET_RESTRICTIONS = [
3032 "None" ,
@@ -111,9 +113,7 @@ const MAX_TEAM_SIZE = 4;
111113const WEEK_OF = "Week Of" ;
112114
113115const EMAIL_SUBJECTS = { } ;
114- EMAIL_SUBJECTS [
115- HACKER_STATUS_NONE
116- ] = `Get started on your application!` ;
116+ EMAIL_SUBJECTS [ HACKER_STATUS_NONE ] = `Get started on your application!` ;
117117EMAIL_SUBJECTS [
118118 HACKER_STATUS_APPLIED
119119] = `Thanks for applying to ${ HACKATHON_NAME } !` ;
@@ -160,6 +160,7 @@ module.exports = {
160160 HACKER_STATUS_WITHDRAWN : HACKER_STATUS_WITHDRAWN ,
161161 HACKER_STATUS_CHECKED_IN : HACKER_STATUS_CHECKED_IN ,
162162 HACKER_STATUSES : HACKER_STATUSES ,
163+ APPLICATION_CLOSE_TIME : APPLICATION_CLOSE_TIME ,
163164 REQUEST_TYPES : REQUEST_TYPES ,
164165 JOB_INTERESTS : JOB_INTERESTS ,
165166 SHIRT_SIZES : SHIRT_SIZES ,
Original file line number Diff line number Diff line change @@ -17,9 +17,13 @@ const QRCode = require("qrcode");
1717function createHacker ( hackerDetails ) {
1818 const TAG = `[Hacker Service # createHacker]:` ;
1919
20- const hacker = new Hacker ( hackerDetails ) ;
20+ let hacker ;
2121
22- return hacker . save ( ) ;
22+ if ( Date . now ( ) < Constants . APPLICATION_CLOSE_TIME ) {
23+ hacker = new Hacker ( hackerDetails ) ;
24+ return hacker . save ( ) ;
25+ }
26+ throw new Error ( "Sorry, the application deadline has passed!" ) ;
2327}
2428
2529/**
You can’t perform that action at this time.
0 commit comments