From 7907a5d33892bdfd4af707fd670f9b364bc8e17f Mon Sep 17 00:00:00 2001 From: Alexandro Perez Date: Sat, 14 Aug 2021 10:09:09 -0500 Subject: [PATCH] fix: subfolder support for api_domain wakatime api (#1235) --- src/fetchers/wakatime-fetcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fetchers/wakatime-fetcher.js b/src/fetchers/wakatime-fetcher.js index 55809e2a0ab7b..92371ff52fb07 100644 --- a/src/fetchers/wakatime-fetcher.js +++ b/src/fetchers/wakatime-fetcher.js @@ -4,7 +4,7 @@ const fetchWakatimeStats = async ({ username, api_domain, range }) => { try { const { data } = await axios.get( `https://${ - api_domain ? api_domain.replace(/[^a-z-.0-9]/gi, "") : "wakatime.com" + api_domain ? api_domain.replace(/\/$/gi, "") : "wakatime.com" }/api/v1/users/${username}/stats/${range || ''}?is_including_today=true`, );