Api: Make getGitActivity return an array with datapoint objects
This commit is contained in:
parent
8d7235bb82
commit
38d7bd2c40
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ async function getData(): Promise<string> {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function getGitData(): Promise<{ [date: string]: number }> {
|
async function getGitData(): Promise<Array<{ date: string, count: number}>> {
|
||||||
console.log("Refreshing Data");
|
console.log("Refreshing Data");
|
||||||
|
|
||||||
let token = "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";
|
let token = "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";
|
||||||
|
@ -122,5 +122,5 @@ async function getGitData(): Promise<{ [date: string]: number }> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return Object.keys(output).map(date => { return { date, count: output[date] }; });
|
||||||
}
|
}
|
Loading…
Reference in a new issue