Get tests passing again

This commit is contained in:
Michael Jackson
2019-07-09 17:21:25 -07:00
parent 2e3c9ff526
commit f3ecddea47
42 changed files with 309 additions and 305 deletions

View File

@ -1,4 +1,4 @@
import * as cloudflare from './cloudflare.js';
import { getZones, getZoneAnalyticsDashboard } from './cloudflare.js';
function extractPublicInfo(data) {
return {
@ -28,12 +28,8 @@ function extractPublicInfo(data) {
const DomainNames = ['unpkg.com', 'npmcdn.com'];
export default async function getStats(since, until) {
const zones = await cloudflare.getZones(DomainNames);
const dashboard = await cloudflare.getZoneAnalyticsDashboard(
zones,
since,
until
);
const zones = await getZones(DomainNames);
const dashboard = await getZoneAnalyticsDashboard(zones, since, until);
return {
timeseries: dashboard.timeseries.map(extractPublicInfo),