From a54a2a4009b34db5e65ebe7c16fd2b957fe04abf Mon Sep 17 00:00:00 2001 From: anuraghazra Date: Thu, 9 Jul 2020 20:32:34 +0530 Subject: [PATCH] feat: added hide_border --- api/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/index.js b/api/index.js index ec914d6..f602a49 100644 --- a/api/index.js +++ b/api/index.js @@ -75,7 +75,7 @@ const renderSVG = (stats, options) => { totalPRs, contributedTo, } = stats; - const { hide, show_icons } = options || {}; + const { hide, show_icons, hide_border } = options || {}; const STAT_MAP = { stars: ` @@ -122,7 +122,10 @@ const renderSVG = (stats, options) => { ${show_icons && "display: block"} } - + ${ + !hide_border && + `` + } ${name}'s GitHub Stats @@ -135,7 +138,9 @@ const renderSVG = (stats, options) => { module.exports = async (req, res) => { const username = req.query.username; const hide = req.query.hide; + const hide_border = req.query.hide_border; const show_icons = req.query.show_icons; + let { name, totalPRs, @@ -156,7 +161,7 @@ module.exports = async (req, res) => { totalPRs, contributedTo, }, - { hide: JSON.parse(hide || "[]"), show_icons } + { hide: JSON.parse(hide || "[]"), show_icons, hide_border } ) ); };