mirror of
https://github.com/bigchaindb/github-projects.git
synced 2024-11-22 09:56:51 +01:00
syntax updates
This commit is contained in:
parent
e391a171bc
commit
de93d76016
14
index.js
14
index.js
@ -63,12 +63,12 @@ const fetchRepos = () => {
|
|||||||
topics
|
topics
|
||||||
})).sort((p1, p2) => p2.stars - p1.stars)
|
})).sort((p1, p2) => p2.stars - p1.stars)
|
||||||
|
|
||||||
log(`Re-built projects cache. ` +
|
log('Re-built projects cache. ' +
|
||||||
`Total: ${data_.length} public BigchainDB projects. ` +
|
`Total: ${data_.length} public BigchainDB projects. ` +
|
||||||
`Elapsed: ${(new Date() - start)}ms`)
|
`Elapsed: ${(new Date() - start)}ms`)
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(error => {
|
||||||
logError('Error parsing response from GitHub: ' + err.stack)
|
logError('Error parsing response from GitHub: ' + error.stack)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,12 +96,12 @@ const fetchReleases = () => {
|
|||||||
release_url: data_.html_url
|
release_url: data_.html_url
|
||||||
})
|
})
|
||||||
|
|
||||||
log(`Re-built releases cache. ` +
|
log('Re-built releases cache. ' +
|
||||||
`Latest release: ${data_.tag_name}. ` +
|
`Latest release: ${data_.tag_name}. ` +
|
||||||
`Elapsed: ${(new Date() - start)}ms`)
|
`Elapsed: ${(new Date() - start)}ms`)
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(error => {
|
||||||
logError('Error parsing response from GitHub: ' + err.stack)
|
logError('Error parsing response from GitHub: ' + error.stack)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ module.exports = async (req, res) => {
|
|||||||
|
|
||||||
// Merge the responses together
|
// Merge the responses together
|
||||||
// kinda hacky, needs rewrite for adding release info to all objects in dataRepos
|
// 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})
|
data = Object.assign(dataRepos, {0: data})
|
||||||
|
|
||||||
// Make json pretty again.
|
// Make json pretty again.
|
||||||
|
@ -5,7 +5,7 @@ import request from 'request-promise'
|
|||||||
|
|
||||||
test('it works', async t => {
|
test('it works', async t => {
|
||||||
const service = micro(async (req, res) => {
|
const service = micro(async (req, res) => {
|
||||||
micro.send(res, 200, {
|
await micro.send(res, 200, {
|
||||||
test: 'woot'
|
test: 'woot'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user