mirror of
https://github.com/bigchaindb/meetups.git
synced 2024-11-24 02:52:59 +01:00
syntax updates
This commit is contained in:
parent
89db84b2b6
commit
678a79fb50
10
index.js
10
index.js
@ -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
|
||||
}
|
||||
|
@ -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…
Reference in New Issue
Block a user