Skip to content

Commit ef9b73d

Browse files
committed
bug fix
1 parent ca613e8 commit ef9b73d

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

functions/utilities/privacy/router.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,17 @@ router.get("/student/accept", studentMiddleware, async (req, res) => {
177177
}
178178
});
179179

180+
const SevenDays = 7 * 24 * 60 * 60 * 1000;
181+
180182
router.get("/guardian/load/:token", guardianMiddleware, async (req, res) => {
183+
const startTime = res.locals.guardianStudent[firstSeenKey];
184+
181185
res.status(200).send({
182186
success: true,
183187
error: null,
184188
data: {
185189
first: res.locals.guardianStudent.first,
190+
dueDate: startTime ? startTime + SevenDays : null,
186191
},
187192
});
188193
});

functions/views/_layout.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ html
172172
a(href="https://mathigon.org" target="_blank") #[img(src="/images/mathigon.png" width=16 height=16)] Mathigon
173173

174174
if user && user.privacy && user.privacy.visible
175-
iframe(src="/privacy" id="privacy-iframe" style="height: 100%;width: 100%;position: absolute;z-index: 10000000000;top: 0;left: 0;border: none;")
175+
iframe(src="/privacy-modal" id="privacy-iframe" style="height: 100%;width: 100%;position: absolute;z-index: 10000000000;top: 0;left: 0;border: none;")
176176

177177
script(defer src="https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js")
178178
script(defer src="https://www.gstatic.com/firebasejs/8.10.0/firebase-auth.js")

0 commit comments

Comments
 (0)