diff --git a/server.js b/server.js index 87ffd1a..07f229f 100644 --- a/server.js +++ b/server.js @@ -3807,6 +3807,17 @@ const server = http.createServer(async (req, res) => { if (!isAdmin(req)) return json(res, 401, { error: 'auth' }); return json(res, 200, await tank.adminView()); } + // an adoption made for a member (Marty 2026-11-14: sponsors who lost people when the contract sponsor won get a few from the + // tank). The same tank.adopt as the member's own button: their eligibility and cap, the adoptee's email and chat. No payments-topic + // post per pickup (a batch would flood it). + if (p === '/api/admin/tank/adopt' && req.method === 'POST') { + if (!isAdmin(req)) return json(res, 401, { error: 'auth' }); + const b = await readBody(req); + if (!b.adopter || !b.who) return json(res, 400, { error: 'adopter and who' }); + if (fraud.excluded(b.adopter)) return json(res, 403, { error: 'Adoptions are not available on that account.' }); + const r = await tank.adopt(String(b.adopter).toLowerCase(), b.who, b.note); + return json(res, r.error ? 400 : 200, r); + } // -- admin Traffic tab: page views + join-page views + signups + $20 buyers, by referring // domain / first-touch source, by landing page, by angle and by day (Marty, 2026-09-12) // login-ad showings per Central day, dashboard vs games (2026-10-18: a week of combined sign-ins before the cap decision)