Skip to content

Commit 7266b09

Browse files
committed
fix logging statements for public auditable routes
1 parent 9a11896 commit 7266b09

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/api/functions/mobileWallet.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export async function issueAppleWalletMembershipCard(
3434
environmentConfig: ConfigType,
3535
runEnvironment: RunEnvironment,
3636
email: string,
37+
initiator: string,
3738
logger: pino.Logger,
3839
name?: string,
3940
) {
@@ -117,7 +118,7 @@ export async function issueAppleWalletMembershipCard(
117118
pkpass.backFields.push({ label: "Membership ID", key: "id", value: email });
118119
const buffer = pkpass.getAsBuffer();
119120
logger.info(
120-
{ type: "audit", actor: email, target: email },
121+
{ type: "audit", actor: initiator, target: email },
121122
"Created membership verification pass",
122123
);
123124
return buffer;

src/api/sqs/handlers.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const getAuthorizedClients = async (
5454

5555
export const emailMembershipPassHandler: SQSHandlerFunction<
5656
AvailableSQSFunctions.EmailMembershipPass
57-
> = async (payload, _metadata, logger) => {
57+
> = async (payload, metadata, logger) => {
5858
const email = payload.email;
5959
const commonConfig = { region: genericConfig.AwsRegion };
6060
const clients = await getAuthorizedClients(logger, commonConfig);
@@ -68,6 +68,7 @@ export const emailMembershipPassHandler: SQSHandlerFunction<
6868
environmentConfig[runEnvironment],
6969
runEnvironment,
7070
email,
71+
metadata.initiator,
7172
logger,
7273
userProfile.displayName,
7374
);

0 commit comments

Comments
 (0)