fix pin card with show, remove new logging, rewrite to preview backend
This commit is contained in:
@@ -100,9 +100,7 @@ export default async (req, res) => {
|
||||
|
||||
try {
|
||||
await storeRequest(req);
|
||||
console.log(show);
|
||||
const showStats = parseArray(show);
|
||||
console.log(showStats);
|
||||
const repoData = await fetchRepo(
|
||||
username,
|
||||
repo,
|
||||
@@ -122,7 +120,6 @@ export default async (req, res) => {
|
||||
|
||||
setCacheHeaders(res, cacheSeconds);
|
||||
|
||||
console.log("before send");
|
||||
return res.send(
|
||||
renderRepoCard(repoData, {
|
||||
hide_border: parseBoolean(hide_border),
|
||||
|
||||
@@ -113,6 +113,7 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
value: totalPRsAuthored,
|
||||
id: "prs_authored",
|
||||
link: `https://github.com/search?q=${repoFilter}author%3A${username}&type=pullrequests`,
|
||||
number_format: "short",
|
||||
};
|
||||
}
|
||||
if (show.includes("prs_commented")) {
|
||||
@@ -122,6 +123,7 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
value: totalPRsCommented,
|
||||
id: "prs_commented",
|
||||
link: `https://github.com/search?q=${repoFilter}commenter%3A${username}+-author%3A${username}&type=pullrequests`,
|
||||
number_format: "short",
|
||||
};
|
||||
}
|
||||
if (show.includes("prs_reviewed")) {
|
||||
@@ -131,6 +133,7 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
value: totalPRsReviewed,
|
||||
id: "prs_reviewed",
|
||||
link: `https://github.com/search?q=${repoFilter}reviewed-by%3A${username}+-author%3A${username}&type=pullrequests`,
|
||||
number_format: "short",
|
||||
};
|
||||
}
|
||||
if (show.includes("issues_authored")) {
|
||||
@@ -140,6 +143,7 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
value: totalIssuesAuthored,
|
||||
id: "issues_authored",
|
||||
link: `https://github.com/search?q=${repoFilter}author%3A${username}&type=issues`,
|
||||
number_format: "short",
|
||||
};
|
||||
}
|
||||
if (show.includes("issues_commented")) {
|
||||
@@ -149,6 +153,7 @@ const renderRepoCard = (repo, options = {}) => {
|
||||
value: totalIssuesCommented,
|
||||
id: "issues_commented",
|
||||
link: `https://github.com/search?q=${repoFilter}commenter%3A${username}+-author%3A${username}&type=issues`,
|
||||
number_format: "short",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "/frontend/:match*",
|
||||
"destination": "https://gse-frontend.vercel.app/:match*"
|
||||
"destination": "https://gse-frontend-preview.vercel.app/:match*"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user