Skip to content

Commit 91d6fa2

Browse files
committed
update casing
1 parent 79f410a commit 91d6fa2

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

dotcom-rendering/src/components/SignInGate/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ export interface AuxiaAPIResponseDataUserTreatment {
110110

111111
export interface AuxiaProxyGetTreatmentsPayload {
112112
browserId: string | undefined;
113-
is_supporter: boolean;
114-
daily_article_count: number;
115-
article_identifier: string;
113+
isSupporter: boolean;
114+
dailyArticleCount: number;
115+
articleIdentifier: string;
116116
}
117117

118118
export interface AuxiaProxyGetTreatmentsResponse {
@@ -155,8 +155,8 @@ export interface AuxiaProxyLogTreatmentInteractionPayload {
155155

156156
export interface AuxiaGateReaderPersonalData {
157157
browserId: string | undefined;
158-
daily_article_count: number;
159-
is_supporter: boolean;
158+
dailyArticleCount: number;
159+
isSupporter: boolean;
160160
}
161161

162162
export interface AuxiaGateDisplayData {

dotcom-rendering/src/components/SignInGateSelector.importable.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -453,11 +453,11 @@ interface ShowSignInGateAuxiaProps {
453453
const decideIsSupporter = (): boolean => {
454454
// nb: We will not be calling the Auxia API if the user is signed in, so we can set isSignedIn to false.
455455
const isSignedIn = false;
456-
const is_supporter = shouldHideSupportMessaging(isSignedIn);
457-
if (is_supporter === 'Pending') {
456+
const isSupporter = shouldHideSupportMessaging(isSignedIn);
457+
if (isSupporter === 'Pending') {
458458
return true;
459459
}
460-
return is_supporter;
460+
return isSupporter;
461461
};
462462

463463
const decideDailyArticleCount = (): number => {
@@ -478,13 +478,13 @@ const decideAuxiaProxyReaderPersonalData =
478478
async (): Promise<AuxiaGateReaderPersonalData> => {
479479
const browserId =
480480
getCookie({ name: 'bwid', shouldMemoize: true }) ?? '';
481-
const daily_article_count = decideDailyArticleCount();
481+
const dailyArticleCount = decideDailyArticleCount();
482482
const hasConsent = await hasCmpConsentForBrowserId();
483-
const is_supporter = decideIsSupporter();
483+
const isSupporter = decideIsSupporter();
484484
const data = {
485485
browserId: hasConsent ? browserId : undefined,
486-
daily_article_count,
487-
is_supporter,
486+
dailyArticleCount,
487+
isSupporter,
488488
};
489489
return Promise.resolve(data);
490490
};
@@ -493,21 +493,21 @@ const fetchProxyGetTreatments = async (
493493
contributionsServiceUrl: string,
494494
pageId: string,
495495
browserId: string | undefined,
496-
is_supporter: boolean,
497-
daily_article_count: number,
496+
isSupporter: boolean,
497+
dailyArticleCount: number,
498498
): Promise<AuxiaProxyGetTreatmentsResponse> => {
499499
// pageId example: 'money/2017/mar/10/ministers-to-criminalise-use-of-ticket-tout-harvesting-software'
500-
const article_identifier = `www.theguardian.com/${pageId}`;
500+
const articleIdentifier = `www.theguardian.com/${pageId}`;
501501

502502
const url = `${contributionsServiceUrl}/auxia/get-treatments`;
503503
const headers = {
504504
'Content-Type': 'application/json',
505505
};
506506
const payload: AuxiaProxyGetTreatmentsPayload = {
507507
browserId,
508-
is_supporter,
509-
daily_article_count,
510-
article_identifier,
508+
isSupporter,
509+
dailyArticleCount,
510+
articleIdentifier,
511511
};
512512
const params = {
513513
method: 'POST',
@@ -531,8 +531,8 @@ const buildAuxiaGateDisplayData = async (
531531
contributionsServiceUrl,
532532
pageId,
533533
readerPersonalData.browserId,
534-
readerPersonalData.is_supporter,
535-
readerPersonalData.daily_article_count,
534+
readerPersonalData.isSupporter,
535+
readerPersonalData.dailyArticleCount,
536536
);
537537
if (response.status && response.data) {
538538
const answer = {

0 commit comments

Comments
 (0)