Skip to content

Commit

Permalink
fix(benchmarks): Publish changes in contentful data update script (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
vladar committed May 18, 2020
1 parent 6450af2 commit 00ec189
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions benchmarks/source-contentful/bin/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,11 @@ async function runDataUpdate() {
limit: 1
})

const entry = entries.items[0]
let entry = entries.items[0]
const title = entry.fields.title[locale]
entry.fields.title[locale] = `${title.substring(0, title.lastIndexOf(` `))} ${Date.now()}`

await entry.update()
entry = await entry.update()
await entry.publish()
console.log(`Updated ${chalk.green(entry.sys.id)}`)
}

0 comments on commit 00ec189

Please sign in to comment.