feat: Add count_private flag to count private contributions (#148)

* Add private contributions count

* Remove unused var and add tests

* Update readme

* fix: tests & minor code formating

* docs: updated docs

Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
This commit is contained in:
Fábio Rosado
2020-07-24 15:04:38 +01:00
committed by GitHub
parent 3a9ded0a09
commit 4c0518616f
5 changed files with 104 additions and 21 deletions

View File

@@ -17,6 +17,7 @@ module.exports = async (req, res) => {
hide_border,
hide_rank,
show_icons,
count_private,
line_height,
title_color,
icon_color,
@@ -30,7 +31,7 @@ module.exports = async (req, res) => {
res.setHeader("Content-Type", "image/svg+xml");
try {
stats = await fetchStats(username);
stats = await fetchStats(username, parseBoolean(count_private));
} catch (err) {
return res.send(renderError(err.message));
}