mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-08-04 01:42:00 +00:00
feat: receives text, title and icon colors from URL
This commit is contained in:
14
api/index.js
14
api/index.js
@@ -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,
|
||||
})
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user