mirror of
https://github.com/oceanprotocol/community-numbers.git
synced 2024-11-21 17:27:01 +01:00
removed await from response.data
This commit is contained in:
parent
9f5dd000dd
commit
0ca44119f5
@ -11,7 +11,7 @@ const getGitcoin = async () => {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
const total = await response.data
|
const total = response.data
|
||||||
const open = total.filter((item) => item.is_open === true)
|
const open = total.filter((item) => item.is_open === true)
|
||||||
|
|
||||||
return { total: total.length, open: open.length }
|
return { total: total.length, open: open.length }
|
||||||
|
@ -7,7 +7,7 @@ export default async function fetchDiscord() {
|
|||||||
const start = Date.now()
|
const start = Date.now()
|
||||||
|
|
||||||
const response = await axios.get(url)
|
const response = await axios.get(url)
|
||||||
const body = await response.data
|
const body = response.data
|
||||||
const data = await load(body, { normalizeWhitespace: true })
|
const data = await load(body, { normalizeWhitespace: true })
|
||||||
|
|
||||||
// extract members count from meta description
|
// extract members count from meta description
|
||||||
|
@ -24,7 +24,7 @@ export default async function fetchGitHubRepos() {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
const json = await response.data
|
const json = response.data
|
||||||
const numbers = json.map((item) => item.stargazers_count)
|
const numbers = json.map((item) => item.stargazers_count)
|
||||||
const stars = arrSum(numbers)
|
const stars = arrSum(numbers)
|
||||||
const repositories = json.length
|
const repositories = json.length
|
||||||
|
@ -11,7 +11,7 @@ export default async function fetchMedium() {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
const responseText = await response.data
|
const responseText = response.data
|
||||||
const json = await JSON.parse(responseText.replace('])}while(1);</x>', ''))
|
const json = await JSON.parse(responseText.replace('])}while(1);</x>', ''))
|
||||||
const { collection } = json.payload
|
const { collection } = json.payload
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ export default async function fetchTwitter() {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
const json = await response.data
|
const json = response.data
|
||||||
const followers = json[0].followers_count
|
const followers = json[0].followers_count
|
||||||
|
|
||||||
log(
|
log(
|
||||||
|
Loading…
Reference in New Issue
Block a user