update tinyurl, set PROD=false, add logging

This commit is contained in:
martin-mfg
2026-01-03 10:15:33 +01:00
parent 4efe0376a9
commit d490c81521
3 changed files with 6 additions and 5 deletions
+3
View File
@@ -100,7 +100,9 @@ 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,
@@ -120,6 +122,7 @@ export default async (req, res) => {
setCacheHeaders(res, cacheSeconds);
console.log("before send");
return res.send(
renderRepoCard(repoData, {
hide_border: parseBoolean(hide_border),
+1 -1
View File
@@ -176,7 +176,7 @@ const renderError = ({
<text x="25" y="45" class="text">Something went wrong!${
UPSTREAM_API_ERRORS.includes(secondaryMessage) || !show_repo_link
? ""
: " file an issue at https://tiny.one/readme-stats"
: " file an issue at https://tinyurl.com/github-stats"
}</text>
<text data-testid="message" x="25" y="55" class="text small">
<tspan x="25" dy="18">${encodeHTML(message)}</tspan>
+2 -4
View File
@@ -1,5 +1,5 @@
/* eslint-disable no-nested-ternary */
export const PROD = true;
export const PROD = false;
export const USE_LOGGER = true;
@@ -9,9 +9,7 @@ export const HOST = PROD
? 'github-stats-extended.vercel.app'
: 'github-stats-extended-preview.vercel.app';
export const REDIRECT_URI = PROD
? `https://${HOST}/frontend`
: `http://${HOST}/frontend`;
export const REDIRECT_URI = `https://${HOST}/frontend`;
export const GITHUB_PRIVATE_AUTH_URL = `https://github.com/login/oauth/authorize?scope=user,repo&client_id=${CLIENT_ID}&redirect_uri=${REDIRECT_URI}/private`;
export const GITHUB_PUBLIC_AUTH_URL = `https://github.com/login/oauth/authorize?client_id=${CLIENT_ID}&redirect_uri=${REDIRECT_URI}/public`;