Member erase (Marty 2026-11-15, ticket LS-1021): POST /api/admin/erase {email, dryRun (default true), force} + the hub's member.erased event
erase.js runs inside the app so the documents modules keep in memory and the MySQL docs rows stay consistent. Refused
unless force: a main wallet, an on-chain member number, positions, a team here, ads running or queued. Removes the
account, their spin links with every click row in rot_hits and conversions (rotator.eraseOwner, docstore.rowsWhere),
and scrubs every document that mentions them with scrub.js (same file as InstantAdPay) through the owning module's live
copy: accounts, audiences, coach, convtrack, earned (unspent credits go away), hubsync, iapsync, mail-intro, postbacks,
registry, rotator, sponsorfollow; others (updates-log, ...) through docstore. A 30-day email-hash tombstone (erase.json)
stops the InstantAdPay registry sync and hub events from bringing them back; the log keeps hashes and counts only.
hubsync handles member.erased {emailHash}. qa/erase.test.cjs 6 pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -63,4 +63,4 @@ async function importRows(rows, property) {
|
||||
let n = 0; for (const r of rows || []) { if (await upsert(Object.assign({ firstProperty: property || 'instantadpay' }, r))) n++; } return n;
|
||||
}
|
||||
|
||||
module.exports = { init, get, byWallet, byUsername, upsert, all, count, chainUp, importRows };
|
||||
module.exports = { /* member erase (erase.js, 2026-11-15): the live copy */ _json: { state: () => { if (!J.db) J.load(); return J.db; }, save: () => J.save() }, init, get, byWallet, byUsername, upsert, all, count, chainUp, importRows };
|
||||
|
||||
Reference in New Issue
Block a user