Add home "team by the numbers" showcase + why-a-winning-team-pays
Public /api/public/org-stats (from config.orgRootId, default 21) feeds a
prominent home-page band: share of the whole network, team size,
generations deep, and on-chain POL to the team — populated by bridge.js,
section hides itself if stats aren't ready. Paired with three mechanics
cards (spillover fills your matrix, depth pays as it climbs, the rotation
qualifies you) that make the "winning team" case honestly, plus the risk
caveat ("most participants may not profit") and a disclaimer link.
Live: 51.1% of members, 48 in the org, 10 generations, 25,423 POL.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -366,6 +366,12 @@ async function handleApi(req,res,pathname){
|
||||
if(req.method==='GET'&&pathname==='/api/public/payouts'){
|
||||
return json(res,200,chain.getPayoutsPublic(),{'Cache-Control':'public, max-age=20'});
|
||||
}
|
||||
if(req.method==='GET'&&pathname==='/api/public/org-stats'){
|
||||
const root=Number(getConfig().orgRootId||21);
|
||||
const d=chain.getOrgShare(Number.isInteger(root)&&root>0?root:21);
|
||||
// expose only the aggregate showcase numbers (all public on-chain data)
|
||||
return json(res,200,{ready:d.ready,found:!!d.found,memberPct:d.memberPct,orgMembers:d.orgMembers,generations:d.generations,orgPol:d.orgPol,totalMembers:d.totalMembers},{'Cache-Control':'public, max-age=60'});
|
||||
}
|
||||
if(req.method==='GET'&&pathname==='/api/public/alert-status'){
|
||||
const id=Number(new URL(req.url,'http://x').searchParams.get('id')||0);
|
||||
const rec=getMemberAlerts()[id];
|
||||
|
||||
Reference in New Issue
Block a user