99 acceptedKey,
1010 acceptedByKey,
1111 variantModeKey,
12+ latestTouchKey,
1213 isUnderThirteen,
1314 getPrivacyState,
1415 generateGuardianPrivacyAuthToken,
@@ -35,6 +36,7 @@ const getViewData = (req) => {
3536 acceptedKey ,
3637 acceptedByKey ,
3738 variantModeKey ,
39+ latestTouchKey ,
3840 "birthMonth" ,
3941 "birthYear" ,
4042 ] ;
@@ -74,6 +76,7 @@ router.post("/reset", studentMiddleware, async (req, res) => {
7476 [ acceptedKey ] : req . body . acceptedKey || null ,
7577 [ acceptedByKey ] : req . body . acceptedByKey || null ,
7678 [ variantModeKey ] : req . body . variantMode || null ,
79+ [ latestTouchKey ] : req . body . latestTouch || null ,
7780 birthMonth : req . body . birthMonth || "1" ,
7881 birthYear : req . body . birthYear || "2025" ,
7982 } ;
@@ -83,44 +86,6 @@ router.post("/reset", studentMiddleware, async (req, res) => {
8386 return res . status ( 200 ) . send ( getResponseBody ( req , updateBody ) ) ;
8487} ) ;
8588
86- // const bodies = {
87- // under13_new: {
88- // birthMonth: "1",
89- // birthYear: "2025",
90- // },
91- // over13_new: {
92- // birthMonth: "1",
93- // birthYear: "1990",
94- // },
95- // year8webinar_new: {
96- // birthMonth: "1",
97- // birthYear: "1990",
98- // [dueByKey]: Date.now() + 30 * 24 * 60 * 60 * 1000, // 30 days from now
99- // [variantModeKey]: 'year8webinar',
100- // },
101- // year8webinar_31daysago: {
102- // [firstSeenKey]: Date.now() - 31 * 24 * 60 * 60 * 1000, // first seen was 31 days ago
103- // [dueByKey]: Date.now() - 24 * 60 * 60 * 1000, // due date was 1 day ago
104- // birthMonth: "1",
105- // birthYear: "2025", // Age doesn't matter for this variant
106- // [variantModeKey]: 'year8webinar',
107- // },
108- // under13_8daysago: {
109- // [firstSeenKey]: Date.now() - 8 * 24 * 60 * 60 * 1000, // first seen was 8 days ago
110- // [dueByKey]: Date.now() - 24 * 60 * 60 * 1000, // due date was 1 day ago
111- // [userNeedsGuardianTouchKey]: Date.now() - 8 * 24 * 60 * 60 * 1000, // guardian touch was 8 days ago
112- // [guardianPrivacyAuthTokenKey]: generateGuardianPrivacyAuthToken(),
113- // birthMonth: "1",
114- // birthYear: "2025",
115- // },
116- // over13_8daysago: {
117- // [firstSeenKey]: Date.now() - 8 * 24 * 60 * 60 * 1000, // first seen was 8 days ago
118- // [dueByKey]: Date.now() - 24 * 60 * 60 * 1000, // due date was 1 day ago
119- // birthMonth: "1",
120- // birthYear: "1990",
121- // }
122- // }
123-
12489router . get ( "/view" , studentMiddleware , async ( req , res ) => {
12590 return res . status ( 200 ) . send ( { data : getViewData ( req ) } ) ;
12691} ) ;
0 commit comments