Use destructuring props assignment

This commit is contained in:
Omid Nikrah 2020-07-10 21:35:14 +04:30 committed by GitHub
parent 43c49de37f
commit 9083ae3e49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");