From 9083ae3e4943c8f7e3976a9ced560a5741ee5869 Mon Sep 17 00:00:00 2001 From: Omid Nikrah Date: Fri, 10 Jul 2020 21:35:14 +0430 Subject: [PATCH] Use destructuring props assignment --- api/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/api/index.js b/api/index.js index fae138b..404451f 100644 --- a/api/index.js +++ b/api/index.js @@ -135,11 +135,7 @@ 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; - const line_height = req.query.line_height; + const { username, hide, hide_border, show_icons, line_height } = req.query; let stats; res.setHeader("Content-Type", "image/svg+xml");