fix: Make WakaTime card compatible with new API (#2707)

* fix: Make WakaTime card compatible with new API

This commit makes sure that the WakaTime card works with the new
WakaTime API. See https://github.com/anuraghazra/github-readme-stats/issues/2698
for more information.

* fix: fix chinese simplified translations

* fix: improve WakaTime range order

* test: fix WakaTime tests

* refactor: remove WakaTime range loop

* refactor: remove redundant WakaTime call

* test: fix e2e tests

Co-authored-by: Hakula Chen <i@hakula.xyz>

---------

Co-authored-by: Hakula Chen <i@hakula.xyz>
This commit is contained in:
Rick Staa
2023-06-02 11:07:59 +02:00
committed by GitHub
parent e0b3d833b0
commit c301289f7d
10 changed files with 57 additions and 22 deletions
+1 -2
View File
@@ -28,7 +28,6 @@ export default async (req, res) => {
langs_count,
hide,
api_domain,
range,
border_radius,
border_color,
} = req.query;
@@ -40,7 +39,7 @@ export default async (req, res) => {
}
try {
const stats = await fetchWakatimeStats({ username, api_domain, range });
const stats = await fetchWakatimeStats({ username, api_domain });
let cacheSeconds = clampValue(
parseInt(cache_seconds || CONSTANTS.FOUR_HOURS, 10),