diff --git a/src/pages/api/getGitActivity.ts b/src/pages/api/getGitActivity.ts index a3e7060..28ebaf2 100644 --- a/src/pages/api/getGitActivity.ts +++ b/src/pages/api/getGitActivity.ts @@ -67,7 +67,7 @@ async function getData(): Promise { } -async function getGitData(): Promise<{ [date: string]: number }> { +async function getGitData(): Promise> { console.log("Refreshing Data"); 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] }; }); } \ No newline at end of file