File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
dotcom-rendering/src/client/userFeatures Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,16 @@ const requestNewData = async () => {
35
35
return syncDataFromUserBenefitsApi ( authStatus ) . then ( persistResponse ) ;
36
36
} ;
37
37
38
+ /**
39
+ * Persist the user benefits response to cookies
40
+ *
41
+ * If new cookies are added/removed/edited, update the persistUserBenefitsCookie function in Gateway
42
+ * https://github.com/guardian/gateway/blob/252b2b2f24be826da42c6e7c1b1e202594184023/src/server/lib/user-features.ts#L88
43
+ *
44
+ * In gateway, the cookies are set after authentication.
45
+ *
46
+ * @param {UserBenefits } userBenefitsResponse
47
+ */
38
48
const persistResponse = ( userBenefitsResponse : UserBenefits ) => {
39
49
createOrRenewCookie ( USER_BENEFITS_EXPIRY_COOKIE ) ;
40
50
if ( userBenefitsResponse . hideSupportMessaging ) {
You can’t perform that action at this time.
0 commit comments