|
18 | 18 | ) # set this via command: firebase functions:secrets:set CLIENT_SECRET |
19 | 19 | REDIRECT_URI = StringParam( |
20 | 20 | "REDIRECT_URI", |
21 | | - default="https://us-central1-hackncsu-today.cloudfunctions.net/oauth_callback", |
| 21 | + default="http://127.0.0.1:5001/hackncsu-today/us-central1/oauth_callback", |
22 | 22 | description="The redirect URI for Discord OAuth2.", |
23 | | -) # set to http://127.0.0.1:5001/hackncsu-today/us-central1/oauth_callback in .env.local for local testing |
| 23 | +) # set to https://us-central1-hackncsu-today.cloudfunctions.net/oauth_callback for prod deploys |
24 | 24 | FRONTEND_AUTH_URI = StringParam( |
25 | 25 | "FRONTEND_AUTH_URI", |
26 | | - default="https://today.hackncstate.org/auth", |
| 26 | + default="http://localhost:8080/auth ", |
27 | 27 | description="The frontend URI to redirect to after authentication is complete.", |
28 | | -) # set to http://localhost:8080/auth in .env.local for local testing |
| 28 | +) # set to https://today.hackncstate.org/auth for prod deploys |
29 | 29 | # set to https://hackncsu-today--dev-maisszg5.web.app/auth for dev deploys |
30 | 30 |
|
31 | 31 | SPREADSHEET_URL = StringParam( |
@@ -154,14 +154,17 @@ def _get_registration(uid: str, username: str) -> User: |
154 | 154 | checked_in_idx = _get_col_index_from_headers( |
155 | 155 | checkin_headers, CHECKED_IN_COL_C.value |
156 | 156 | ) |
157 | | - checked_in = _get_cell_from_row(checkin_row, checked_in_idx) |
| 157 | + checked_in = _get_cell_from_row(checkin_row, checked_in_idx).upper() |
158 | 158 |
|
159 | 159 | # participant did not check in |
160 | | - if str(checked_in).upper() != "TRUE": |
| 160 | + if checked_in == "NO": |
161 | 161 | raise ValueError( |
162 | 162 | "not_checked_in", |
163 | 163 | ) |
164 | 164 |
|
| 165 | + # if checked in friday |
| 166 | + friday_checked_in = checked_in == "FRIDAY" |
| 167 | + |
165 | 168 | shirt_size_idx = _get_col_index_from_headers( |
166 | 169 | reg_headers, SHIRT_SIZE_COL_R.value |
167 | 170 | ) |
@@ -214,6 +217,8 @@ def _get_registration(uid: str, username: str) -> User: |
214 | 217 | dietaryRestrictions=dietary_restrictions, |
215 | 218 | shirtSize=shirt_size, |
216 | 219 | rfidUUID=rfid_uuid, |
| 220 | + # mark if they checked in on friday as having attended the career fair event |
| 221 | + attendedEvents=["career_fair_friday"] if friday_checked_in else [], |
217 | 222 | ) |
218 | 223 |
|
219 | 224 |
|
|
0 commit comments