syntax updates

pull/52/head
Matthias Kretschmann 4 years ago
parent e391a171bc
commit de93d76016
Signed by: m
GPG Key ID: 606EEEF3C479A91F

@ -63,12 +63,12 @@ const fetchRepos = () => {
topics
})).sort((p1, p2) => p2.stars - p1.stars)
log(`Re-built projects cache. ` +
log('Re-built projects cache. ' +
`Total: ${data_.length} public BigchainDB projects. ` +
`Elapsed: ${(new Date() - start)}ms`)
})
.catch(err => {
logError('Error parsing response from GitHub: ' + err.stack)
.catch(error => {
logError('Error parsing response from GitHub: ' + error.stack)
})
}
@ -96,12 +96,12 @@ const fetchReleases = () => {
release_url: data_.html_url
})
log(`Re-built releases cache. ` +
log('Re-built releases cache. ' +
`Latest release: ${data_.tag_name}. ` +
`Elapsed: ${(new Date() - start)}ms`)
})
.catch(err => {
logError('Error parsing response from GitHub: ' + err.stack)
.catch(error => {
logError('Error parsing response from GitHub: ' + error.stack)
})
}
@ -125,7 +125,7 @@ module.exports = async (req, res) => {
// Merge the responses together
// kinda hacky, needs rewrite for adding release info to all objects in dataRepos
data = Object.assign(dataReleases, dataRepos[0])
data = await Object.assign(dataReleases, dataRepos[0])
data = Object.assign(dataRepos, {0: data})
// Make json pretty again.

@ -5,7 +5,7 @@ import request from 'request-promise'
test('it works', async t => {
const service = micro(async (req, res) => {
micro.send(res, 200, {
await micro.send(res, 200, {
test: 'woot'
})
})

Loading…
Cancel
Save