Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
shtukas committed Jan 20, 2025
1 parent 05e20e5 commit 7d0ef2a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
16 changes: 3 additions & 13 deletions src/server/api/auxiaProxyRouter.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*
import express, { Router } from 'express';
import { getSsmValue } from '../utils/ssm';
import fetch from 'node-fetch';
Expand Down Expand Up @@ -31,19 +32,6 @@ interface AuxiaAPIAnswerDataUserTreatment {
surface: string;
}
/*
user treatments example:
{
"treatmentId": "105867",
"treatmentTrackingId": "105867_336_b352c123-c298-493c-a794-90852ec24961",
"rank": "2",
"contentLanguageCode": "en-GB",
"treatmentContent": "{\"title\":\"Create a free account\",\"body\":\"\",\"first_cta_name\":\"Register\",\"first_cta_link\":\"https://profile.theguardian.com/signin?\",\"second_cta_name\":\"Next time\",\"second_cta_link\":\"https://profile.theguardian.com/signin?\",\"subtitle\":\"\"}",
"treatmentType": "DISMISSABLE_SIGN_IN_GATE",
"surface": "ARTICLE_PAGE"
}
*/

interface AuxiaAPIAnswerData {
responseId: string;
userTreatments: AuxiaAPIAnswerDataUserTreatment[];
Expand Down Expand Up @@ -174,3 +162,5 @@ export const buildAuxiaProxyRouter = (config: AuxiaRouterConfig): Router => {
return router;
};
*/
5 changes: 3 additions & 2 deletions src/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { logError } from './utils/logging';
import { buildEpicRouter } from './api/epicRouter';
import { buildBannerRouter } from './api/bannerRouter';
import { buildHeaderRouter } from './api/headerRouter';
import { buildAuxiaProxyRouter, getAuxiaRouterConfig } from './api/auxiaProxyRouter';
//import { buildAuxiaProxyRouter, getAuxiaRouterConfig } from './api/auxiaProxyRouter';
import { buildAmpEpicRouter } from './api/ampEpicRouter';
import { buildChannelSwitchesReloader } from './channelSwitches';
import { buildSuperModeArticlesReloader } from './lib/superMode';
Expand Down Expand Up @@ -124,7 +124,8 @@ const buildApp = async (): Promise<Express> => {
res.send('OK');
});

app.use(buildAuxiaProxyRouter(await getAuxiaRouterConfig()));
//const auxiaConfig = await getAuxiaRouterConfig();
//app.use(buildAuxiaProxyRouter(auxiaConfig));

return Promise.resolve(app);
};
Expand Down
2 changes: 2 additions & 0 deletions src/server/utils/ssm.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*
import { SSMClient, GetParameterCommand } from '@aws-sdk/client-ssm'; // ES Modules import
// https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ssm/command/GetParametersByPathCommand/
Expand All @@ -12,3 +13,4 @@ export async function getSsmValue(stage: string, id: string): Promise<string | u
const response = await client.send(command);
return response.Parameter?.Value;
}
*/

0 comments on commit 7d0ef2a

Please sign in to comment.