fix pin card with show, remove new logging, rewrite to preview backend

This commit is contained in:
martin-mfg
2026-01-03 10:33:29 +01:00
parent d490c81521
commit 29e5c8b0a5
3 changed files with 6 additions and 4 deletions
-3
View File
@@ -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),
+5
View File
@@ -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
View File
@@ -9,7 +9,7 @@
"rewrites": [
{
"source": "/frontend/:match*",
"destination": "https://gse-frontend.vercel.app/:match*"
"destination": "https://gse-frontend-preview.vercel.app/:match*"
}
]
}