fix: added temporary blacklist (#399)
This commit is contained in:
1 parent
c05357d7b2
commit
6fa8c26754
4 files changed
+18
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user