Site host from one module: host.js exports SITE_HOST/SITE_URL and every module, email, Telegram post, QR, ad click URL and OG tag reads it (no more hard-coded test hostname); public pages carry {{SITE_URL}} filled at serve time; frame check carries the curtain pass for our own hosts so a test ad can point at a spin link; stale IAP sitemap removed

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-07 08:52:04 -05:00
parent 6da444c790
commit ad744d8c0f
29 changed files with 135 additions and 111 deletions
+2 -1
View File
@@ -2,10 +2,11 @@
// audience, previews, sends a test to themselves, then sends. Plain text through the site mailer (SendGrid),
// one recipient at a time with a small gap, opt-outs honoured (the same unsubscribe link the drip uses).
// Log: DATA_DIR/updates-log.json. Nothing here sends on its own: every send is a click in Admin > Releases.
const { SITE_URL } = require('./host');
const fs = require('fs');
const path = require('path');
let R = null; // { dataDir, accounts, releases, mailer, drip, sendy, adminEmail }
const SITE = 'https://linkspin-test.saasy.top';
const SITE = SITE_URL;
const FILE = () => path.join(R.dataDir, 'updates-log.json');
function log() { try { return JSON.parse(fs.readFileSync(FILE(), 'utf8')); } catch (e) { return { sends: [] }; } }
function saveLog(l) { try { fs.writeFileSync(FILE(), JSON.stringify(l)); } catch (e) {} }