Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Jul 25, 2024
1 parent 7a39188 commit 05d9c2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/getJobsCompletedCount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ const OFFSET = 155_153_052_475
const OFFSET_DATE = '2024-07-09'

export const getFromApi = async (): Promise<number> => {
console.log('getFromApi() ...')
const res = await fetch(`https://stats.filspark.com/measurements/daily?from=${OFFSET_DATE}`)
const days = await res.json()
const total = days.reduce(
(acc: number, day: any) => acc + day.accepted_measurement_count,
0
)
console.log('getFromApi() ✔️')
return OFFSET + total
}

0 comments on commit 05d9c2c

Please sign in to comment.