Skip to content

Commit e67c0fc

Browse files
authored
Merge pull request #1307 from guardian/tf-log-auxia-id
Log auxiaTreatmentTrackingId
2 parents 8a580ec + 7a8148d commit e67c0fc

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/server/api/auxiaProxyRouter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ export const buildAuxiaProxyRouter = (config: AuxiaRouterConfig): Router => {
200200
if (auxiaData !== undefined) {
201201
const data = buildAuxiaProxyGetTreatmentsResponseData(auxiaData);
202202
res.locals.auxiaTreatmentId = data?.userTreatment?.treatmentId;
203+
res.locals.auxiaTreatmentTrackingId = data?.userTreatment?.treatmentTrackingId;
203204
res.send({ status: true, data: data });
204205
} else {
205206
res.send({ status: false });
@@ -234,6 +235,7 @@ export const buildAuxiaProxyRouter = (config: AuxiaRouterConfig): Router => {
234235
req.body.actionName,
235236
);
236237
res.locals.auxiaTreatmentId = req.body.treatmentId;
238+
res.locals.auxiaTreatmentTrackingId = req.body.treatmentTrackingId;
237239
res.send({ status: true }); // this is the proxy's response, slightly more user's friendly than the api's response.
238240
} catch (error) {
239241
next(error);

src/server/middleware/logging.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const logging = (
2424
epicSuperMode: res.locals.epicSuperMode,
2525
responseTimeInMs: Math.round(responseTimeMs),
2626
auxiaTreatmentId: res.locals.auxiaTreatmentId,
27+
auxiaTreatmentTrackingId: res.locals.auxiaTreatmentTrackingId,
2728
});
2829
});
2930
next();

0 commit comments

Comments
 (0)