Skip to content

Commit

Permalink
Merge pull request anuraghazra#19 from omidnikrah/patch-1
Browse files Browse the repository at this point in the history
Use destructuring query assignment
  • Loading branch information
anuraghazra authored Jul 10, 2020
2 parents 43c49de + 9083ae3 commit 137a9f2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 137a9f2

Please sign in to comment.