fix: added temporary blacklist (#399)

This commit is contained in:
Anurag Hazra authored and GitHub committed 2020-08-17 14:18:17 +05:30
1 parent c05357d7b2
commit 6fa8c26754
4 files changed
+18

No files matched your search

+5
View File
@@ -7,6 +7,7 @@ const {
} = require("../src/common/utils");
const fetchRepo = require("../src/fetchers/repo-fetcher");
const renderRepoCard = require("../src/cards/repo-card");
const blacklist = require("../src/common/blacklist");
module.exports = async (req, res) => {
const {
@@ -25,6 +26,10 @@ module.exports = async (req, res) => {
res.setHeader("Content-Type", "image/svg+xml");
if (blacklist.includes(username)) {
return res.send(renderError("Something went wrong"));
}
try {
repoData = await fetchRepo(username, repo);