Holding tank admin grant: POST /api/admin/tank/grant {adopter, count} assigns N real BTC4Hits imports on top of the cap as auto adoptions, skipping the bot patterns (yandex, dotted gmail); adopt/eligibility take skipCap (Marty 2026-11-11: the adopters who picked up the Yandex batch keep them and get the same number more). tank-cap 15/15, tank-hold all passed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-11 08:58:10 -06:00
parent 163bb9dfa0
commit 3cc687aff5
2 changed files with 22 additions and 4 deletions
+5
View File
@@ -2614,6 +2614,11 @@ const server = http.createServer(async (req, res) => {
const r = await tank.recordGift(s.email, b.email, b.tx, b.pol);
return json(res, r.error ? 400 : 200, r);
}
if (p === '/api/admin/tank/grant' && req.method === 'POST') { // admin: assign N real BTC4Hits imports to an adopter on top of the cap (Marty 2026-11-11)
if (!isAdmin(req)) return json(res, 401, { error: 'auth' });
const b = await readBody(req); const a = await adminMember.resolve(String(b.adopter || '')); if (!a) return json(res, 404, { error: 'No member matches that adopter.' });
tankWaitCache = null; return json(res, 200, await tank.grant(a.email, b.count));
}
if (p === '/api/admin/tank' && req.method === 'GET') {
if (!isAdmin(req)) return json(res, 401, { error: 'auth' });
return json(res, 200, await tank.adminView());