in lambda/recipes-responder/src/takedown_processor.ts [6:33]
export async function handleTakedown({
event,
staticBucketName,
fastlyApiKey,
contentPrefix,
outgoingEventBus,
}: {
event: Event;
staticBucketName: string;
fastlyApiKey: string;
contentPrefix: string;
outgoingEventBus: string;
}): Promise<number> {
console.log('takedown payload: ', JSON.stringify(event));
if (event.itemType == ItemType.CONTENT) {
//there's no payload in the takedown message!
return removeAllRecipesForArticle({
canonicalArticleId: event.payloadId,
staticBucketName,
fastlyApiKey,
contentPrefix,
outgoingEventBus,
}); //event.payloadId is the canonical article ref that was taken down
} else {
return 0;
}
}