Add tests for stats api

This commit is contained in:
Michael Jackson
2019-07-10 13:24:27 -07:00
parent 56110b0314
commit ce9206f59e
5 changed files with 56 additions and 14 deletions

View File

@ -0,0 +1,29 @@
export default function getStats(since, until) {
const stats = {
since: since,
until: until,
requests: {
all: 0,
cached: 0,
country: 0,
status: 0
},
bandwidth: {
all: 0,
cached: 0,
country: 0
},
threats: {
all: 0,
country: 0
},
uniques: {
all: 0
}
};
return Promise.resolve({
timeseries: [stats],
totals: stats
});
}