Skip to content

Commit

Permalink
fix: add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mats16 committed Jun 29, 2023
1 parent c5320ca commit 005ffb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/supabase-cdn/cache-manager/queue-consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const logger = new Logger();
const tracer = new Tracer();
const cloudfront = tracer.captureAWSv3Client(new CloudFrontClient({ region: 'us-east-1' }));

/** Create CloudFront invalidation. */
const createInvalidation = async(paths: string[], callerReference: string) => {
const cmd = new CreateInvalidationCommand({
DistributionId: distributionId,
Expand All @@ -25,6 +26,7 @@ const createInvalidation = async(paths: string[], callerReference: string) => {
return output;
};

/** Convert webhook event to CloudFront paths. */
const eventToPath = (event: WebhookEvent): string[] => {
const bucketId = event.event.payload.bucketId;
const objectName = event.event.payload.name;
Expand Down

0 comments on commit 005ffb2

Please sign in to comment.