Files
indiekit-blog/_data/conversationMentions.js
svemagie 76f181d517
Build & Deploy / build-and-deploy (push) Successful in 2m24s
fix: conversationMentions hardcoded localhost:8080 → INDIEKIT_URL
Port 8080 doesn't exist on the Gitea build runner. Uses INDIEKIT_URL
(http://10.100.0.20:3000) with SITE_URL fallback, same pattern as
the other NAT-hairpin fixes.
2026-05-03 13:20:40 +02:00

15 lines
451 B
JavaScript

import { cachedFetch } from "../lib/data-fetch.js";
export default async function () {
try {
const data = await cachedFetch(
`${process.env.INDIEKIT_URL || process.env.SITE_URL || "http://127.0.0.1:3000"}/conversations/api/mentions?per-page=10000`,
{ duration: "15m", type: "json" }
);
return data.children || [];
} catch (e) {
console.log(`[conversationMentions] API unavailable: ${e.message}`);
return [];
}
}