Skip to content

Commit

Permalink
update example.js to use "await" instead of "then"
Browse files Browse the repository at this point in the history
  • Loading branch information
tulios committed Mar 22, 2017
1 parent 9c137d8 commit 6d293eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions example.js
Expand Up @@ -13,7 +13,7 @@ const github = forge({
})

// profit!
github.Status.lastMessage().then((response) => {
console.log(`status: ${response.data().body}`)
console.log(`loaded in ${response.timeElapsed}ms`)
})
const response = await github.Status.lastMessage()

console.log(`status: ${response.data().body}`)
console.log(`loaded in ${response.timeElapsed}ms`)

0 comments on commit 6d293eb

Please sign in to comment.