feat: receives text, title and icon colors from URL

This commit is contained in:
JoaoVSouto
2020-07-11 16:01:44 -03:00
parent c25319ee6c
commit 59b8bded9c
3 changed files with 34 additions and 6 deletions

View File

@@ -4,7 +4,16 @@ const fetchStats = require("../src/fetchStats");
const renderStatsCard = require("../src/renderStatsCard");
module.exports = async (req, res) => {
const { username, hide, hide_border, show_icons, line_height } = req.query;
const {
username,
hide,
hide_border,
show_icons,
line_height,
title_color,
icon_color,
text_color,
} = req.query;
let stats;
res.setHeader("Content-Type", "image/svg+xml");
@@ -20,6 +29,9 @@ module.exports = async (req, res) => {
show_icons,
hide_border,
line_height,
title_color,
icon_color,
text_color,
})
);
};