From 19cf6919832389f27ae7e74ccee313e6d35b231d Mon Sep 17 00:00:00 2001 From: Zohan Subhash Date: Fri, 13 Jan 2023 18:52:41 +0530 Subject: [PATCH] Update index.js --- api/index.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/api/index.js b/api/index.js index b449d43b..13d6c1f7 100644 --- a/api/index.js +++ b/api/index.js @@ -48,12 +48,20 @@ export default async (req, res) => { } try { - const stats = await fetchStats( - username, - parseBoolean(count_private), - parseBoolean(include_all_commits), - parseArray(exclude_repo), - ); + const stats = { + req.query.totalStars, + req.query.totalCommits, + req.query.totalIssues, + req.query.totalPRs, + req.query.contributedTo, + req.query.rank, + req.query.starsTitle, + req.query.commitsTitle, + req.query.issuesTitle, + req.query.PRsTitle, + req.query.contribsTitle, + req.query.title, + }; const cacheSeconds = clampValue( parseInt(cache_seconds || CONSTANTS.FOUR_HOURS, 10),