Partner links for ViralAdSource: PARTNER_LINKS vas (the vab wiring)

/api/partner/vas/links serves ViralAdSource the same way as vab: ensure / stats / spins, tagged vas:<ad id>, on the member's own
"ViralAdSource" network source (new catalog template viraladsource, NET_SRC vas + viraladsource). qa/partner-vaslinks.test.mjs
(16 checks, incl. account by network username and vab/vas/dh kept apart); vab, dh, spins, netsrc, netconv, housespins green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-17 05:27:27 -06:00
parent 6c5851b4d5
commit 77e18fd230
5 changed files with 106 additions and 4 deletions
+4 -3
View File
@@ -1448,7 +1448,8 @@ function curtained(req, res, u) {
}
// partner sites allowed on /api/partner/<site>/links (2026-11-15): network catalog template + the name the member sees on the link
const PARTNER_LINKS = { dh: { template: 'downlinehydra', name: 'DownlineHydra' }, vab: { template: 'viraladblitz', name: 'ViralAdBlitz' } };
const PARTNER_LINKS = { dh: { template: 'downlinehydra', name: 'DownlineHydra' }, vab: { template: 'viraladblitz', name: 'ViralAdBlitz' },
vas: { template: 'viraladsource', name: 'ViralAdSource' } }; // vas = ViralAdSource text ads (Marty 2026-11-17), the vab wiring
const server = http.createServer(async (req, res) => {
{ const t0 = Date.now(); res.on('finish', () => { const ms = Date.now() - t0; if (ms > 3000) console.warn('slow request', req.method, String(req.url || '').split('?')[0].slice(0, 80), ms + 'ms', res.statusCode); }); } // visibility for member-felt delays (2026-10-12)
try {
@@ -3202,8 +3203,8 @@ const server = http.createServer(async (req, res) => {
}
return json(res, 200, out, { 'Cache-Control': 'no-store' });
}
// -- Partner tracked links (Marty 2026-11-15): /api/partner/<site>/links, site = dh (DownlineHydra program links) or vab (ViralAdBlitz
// text ads, the ad id as sub-id). PARTNER_LINKS names each site's network template and link name. Below, "program" = the
// -- Partner tracked links (Marty 2026-11-15): /api/partner/<site>/links, site = dh (DownlineHydra program links), vab (ViralAdBlitz
// text ads, the ad id as sub-id) or vas (ViralAdSource text ads, the same as vab). PARTNER_LINKS names each site's network template and link name. Below, "program" = the
// partner's item id (a DownlineHydra program, a ViralAdBlitz ad).
// DownlineHydra tracked program links (Marty 2026-11-15). Same net.v1 signature as the Banner Spins call above. A DownlineHydra
// member saved a referral link for an outside program (a wild head or a my head); their downline sees a LinkSpin link for it