1
0
mirror of https://github.com/bigchaindb/meetups.git synced 2024-11-24 02:52:59 +01:00

syntax updates

This commit is contained in:
Matthias Kretschmann 2018-09-04 13:34:49 +02:00
parent 89db84b2b6
commit 678a79fb50
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 6 additions and 6 deletions

View File

@ -33,12 +33,12 @@ const fetchMeetups = () => {
data = data_
log(`Re-built meetups cache. ` +
log('Re-built meetups cache. ' +
`Total: ${data_.length} public meetups. ` +
`Elapsed: ${(new Date() - start)}ms`)
})
.catch(err => {
logError('Error parsing response from Meetup: ' + err.stack)
.catch(error => {
logError('Error parsing response from Meetup: ' + error.stack)
})
}
@ -52,8 +52,8 @@ setInterval(fetchMeetups, ms('15m'))
// Create the response
//
module.exports = async (req, res) => {
res.setHeader('Access-Control-Allow-Origin', '*')
res.setHeader('Access-Control-Allow-Methods', 'GET')
await res.setHeader('Access-Control-Allow-Origin', '*')
await res.setHeader('Access-Control-Allow-Methods', 'GET')
return data
}

View File

@ -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'
})
})