From 8c0ede01926c5776111e5e32ea4d2389b9bdefdf Mon Sep 17 00:00:00 2001 From: David Eagen Date: Wed, 29 Jul 2020 12:23:50 +0000 Subject: [PATCH] Fix incorrect parsing of pub/sub message. --- image_parser/app/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image_parser/app/index.js b/image_parser/app/index.js index ceeed67..16f320a 100644 --- a/image_parser/app/index.js +++ b/image_parser/app/index.js @@ -10,7 +10,7 @@ const database = require('./database'); */ exports.imageParser = (event, callback) => { const pubsubMessage = event.data; - const item = Buffer.from(pubsubMessage.data, 'base64').toString(); + const item = Buffer.from(pubsubMessage, 'base64').toString(); const jsonItem = JSON.parse(item); // For reference, found this here: https://stackoverflow.com/questions/1053902/how-to-convert-a-title-to-a-url-slug-in-jquery#1054862