Skip to content

Commit

Permalink
Fixed log output.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcarboni committed Mar 22, 2020
1 parent 997d595 commit 0bfd10f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions form/index.js
Expand Up @@ -20,7 +20,7 @@ exports.form = async(req, res) => {
const timestamp = new Date().toISOString()
const id = generateId()
const customAttributes = {'timestamp': timestamp, 'id': id}
console.log(`Backup json: ${message} / ${customAttributes}`)
console.log(`Backup json: ${message} / ${JSON.stringify(customAttributes)}`)

// Send message
try {
Expand All @@ -30,7 +30,7 @@ exports.form = async(req, res) => {
const messageId = await pubSubClient
.topic('form-submissions')
.publish(dataBuffer, customAttributes)
console.log(`Message ${messageId} published (${customAttributes}).`)
console.log(`Message ${messageId} published (${JSON.stringify(customAttributes)}).`)
console.log(`Redirecting to success page: ${successPage}`)
res.redirect(`${successPage}?id=${id}`)

Expand Down

0 comments on commit 0bfd10f

Please sign in to comment.