Network ad zones (punch list, Marty 2026-11-17): LinkSpin zones on Marty's account made through LinkSpin's admin zone route (footer wide 728x90, footer phone 320x50, ledger 468x60, not-found 300x250), the ViralAdBlitz pattern; common.js ?v=20261117z
Zones: ls-e5d152 / ls-1a1b1f / ls-20fdd0 / 404 ls-a8a737. Also GET /api/admin/member-lookup (read-only) for the network hub's admin lookup, like ViralAdBlitz. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
<section class="panel"><h3>Best Coach pot (last week)</h3><pre id="potOut" class="kit-pre"></pre></section>
|
<section class="panel"><h3>Best Coach pot (last week)</h3><pre id="potOut" class="kit-pre"></pre></section>
|
||||||
<section class="panel"><h3>Old-link map (JSON {"oldrefs": {"old": "network username"}})</h3><input type="file" id="oldFile" accept="application/json"><pre id="oldOut" class="kit-pre"></pre></section>
|
<section class="panel"><h3>Old-link map (JSON {"oldrefs": {"old": "network username"}})</h3><input type="file" id="oldFile" accept="application/json"><pre id="oldOut" class="kit-pre"></pre></section>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/misc.js?v=3"></script>
|
<script src="/assets/misc.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -118,3 +118,23 @@ window.FX = (function () {
|
|||||||
if (/^\/(draftday|admin)/.test(location.pathname)) return;
|
if (/^\/(draftday|admin)/.test(location.pathname)) return;
|
||||||
var s = document.createElement('script'); s.src = '/assets/netweekend.js?v=20261117'; s.defer = true; s.setAttribute('data-site', 'fivex'); document.head.appendChild(s);
|
var s = document.createElement('script'); s.src = '/assets/netweekend.js?v=20261117'; s.defer = true; s.setAttribute('data-site', 'fivex'); document.head.appendChild(s);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// network ad zones (2026-11-17, the ViralAdBlitz pattern): LinkSpin zones on Marty's LinkSpin account for 5xyourteam.com, made through
|
||||||
|
// LinkSpin's named admin zone route: footer wide 728x90 (ls-e5d152), footer phone 320x50 (ls-1a1b1f), ledger 468x60
|
||||||
|
// (ls-20fdd0); the not-found page carries ls-a8a737. Admin pages get none.
|
||||||
|
(function () {
|
||||||
|
const ZONES = { footWide: 'ls-e5d152', footPhone: 'ls-1a1b1f', ledger: 'ls-20fdd0' };
|
||||||
|
function zone(el, id) {
|
||||||
|
if (!el || el.dataset.zoned) return; el.dataset.zoned = '1'; el.className = 'net-zone'; el.style.cssText = 'margin:18px auto;text-align:center;max-width:100%';
|
||||||
|
const lab = document.createElement('div'); lab.textContent = 'Network'; lab.style.cssText = 'font-size:11px;letter-spacing:1px;opacity:.7;margin-bottom:4px';
|
||||||
|
const s = document.createElement('script'); s.async = true; s.src = 'https://linkspin.app/z.js'; s.setAttribute('data-zone', id);
|
||||||
|
el.appendChild(lab); el.appendChild(s);
|
||||||
|
}
|
||||||
|
function run() {
|
||||||
|
const p = location.pathname.replace(/\/$/, '') || '/';
|
||||||
|
if (p === '/admin' || document.body.dataset.noZones) return;
|
||||||
|
if (p === '/ledger') { const t = document.getElementById('rows'); const sec = t && t.closest('section'); if (sec && sec.parentNode) { const d = document.createElement('div'); sec.parentNode.insertBefore(d, sec.nextSibling); zone(d, ZONES.ledger); } }
|
||||||
|
const za = document.createElement('div'); document.body.appendChild(za); zone(za, window.innerWidth >= 760 ? ZONES.footWide : ZONES.footPhone);
|
||||||
|
}
|
||||||
|
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', run); else run();
|
||||||
|
})();
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
<p id="status" class="note" hidden></p>
|
<p id="status" class="note" hidden></p>
|
||||||
<section class="panel" id="bList"></section>
|
<section class="panel" id="bList"></section>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/wallet.js?v=3"></script>
|
<script src="/assets/wallet.js?v=3"></script>
|
||||||
<script src="/assets/misc.js?v=3"></script>
|
<script src="/assets/misc.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
<section style="display:flex;flex-direction:column;gap:12px"><h2>The five tiers</h2><div class="cards" id="tiers"></div>
|
<section style="display:flex;flex-direction:column;gap:12px"><h2>The five tiers</h2><div class="cards" id="tiers"></div>
|
||||||
<p class="small">Rookie when drafted, Starter when they link a wallet, Pro when they switch on payouts, All-Star at their first purchase, Hall of Fame when they hold a position of their own and coach a team. Tap a card to flip it for the stats on the back.</p></section>
|
<p class="small">Rookie when drafted, Starter when they link a wallet, Pro when they switch on payouts, All-Star at their first purchase, Hall of Fame when they hold a position of their own and coach a team. Tap a card to flip it for the stats on the back.</p></section>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/cards.js?v=3"></script>
|
<script src="/assets/cards.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
<div class="r"><h3>The team</h3><p class="small" style="color:#4a587e">Milestones only. Every Monday this coach drafts people who joined the network without a sponsor and helps them get started.</p><div class="row"><a class="btn-gold" id="cJoin" href="https://instantadpay.com/?return=fivex&to=%2Fmy">Join the network free</a><a class="btn" href="/join">Coach a team of your own</a></div></div></section>
|
<div class="r"><h3>The team</h3><p class="small" style="color:#4a587e">Milestones only. Every Monday this coach drafts people who joined the network without a sponsor and helps them get started.</p><div class="row"><a class="btn-gold" id="cJoin" href="https://instantadpay.com/?return=fivex&to=%2Fmy">Join the network free</a><a class="btn" href="/join">Coach a team of your own</a></div></div></section>
|
||||||
<section class="cards" id="cTeam"></section>
|
<section class="cards" id="cTeam"></section>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/coach.js?v=3"></script>
|
<script src="/assets/coach.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<section><p class="kicker">CONTRACT</p><h1 style="font-size:44px">Check the contract yourself</h1><p class="muted">Read live from Polygon. No owner withdraw, no proxy, the split fixed in the code.</p></section>
|
<section><p class="kicker">CONTRACT</p><h1 style="font-size:44px">Check the contract yourself</h1><p class="muted">Read live from Polygon. No owner withdraw, no proxy, the split fixed in the code.</p></section>
|
||||||
<section class="panel"><div class="tbl"><table id="facts"></table></div></section>
|
<section class="panel"><div class="tbl"><table id="facts"></table></div></section>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/contract.js?v=3"></script>
|
<script src="/assets/contract.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<section class="card"><h2>Prices and taxes</h2><p>Positions are priced in US dollars and paid in POL, whose price moves. You are responsible for any taxes on what you receive where you live.</p></section>
|
<section class="card"><h2>Prices and taxes</h2><p>Positions are priced in US dollars and paid in POL, whose price moves. You are responsible for any taxes on what you receive where you live.</p></section>
|
||||||
<section class="card"><h2>Who to ask</h2><p>TrustClickz. <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Network support</a>.</p></section>
|
<section class="card"><h2>Who to ask</h2><p>TrustClickz. <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Network support</a>.</p></section>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/misc.js?v=3"></script>
|
<script src="/assets/misc.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ h1{margin:0;font-family:Oswald,Impact,sans-serif;font-weight:700;font-size:108px
|
|||||||
</style></head><body data-page="draftday"><div class="dd"><img class="spot" src="/art/dd/spotlight.jpg" alt=""><img class="conf" src="/art/dd/confetti.png" alt=""><div class="top"><span class="wm">5X<b>YOUR</b>TEAM</span><span class="wk" id="ddWeek"></span></div>
|
</style></head><body data-page="draftday"><div class="dd"><img class="spot" src="/art/dd/spotlight.jpg" alt=""><img class="conf" src="/art/dd/confetti.png" alt=""><div class="top"><span class="wm">5X<b>YOUR</b>TEAM</span><span class="wk" id="ddWeek"></span></div>
|
||||||
<h1>DRAFT DAY<br><span>RESULTS</span></h1><div class="rows" id="ddRows"></div>
|
<h1>DRAFT DAY<br><span>RESULTS</span></h1><div class="rows" id="ddRows"></div>
|
||||||
<div class="ft"><div><span id="ddStats"></span><span class="p" id="ddPot"></span></div><span class="url">5xyourteam.com</span></div></div>
|
<div class="ft"><div><span id="ddStats"></span><span class="p" id="ddPot"></span></div><span class="url">5xyourteam.com</span></div></div>
|
||||||
<script src="/assets/common.js?v=4"></script><script src="/assets/misc.js?v=3"></script></body></html>
|
<script src="/assets/common.js?v=20261117z"></script><script src="/assets/misc.js?v=3"></script></body></html>
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@
|
|||||||
<section class="card"><h2>Check it yourself</h2><p>The <a href="/contract">contract page</a> reads the DraftPosition contract live from Polygon, and the <a href="/ledger">ledger</a> lists every payment with its transaction. The <a href="/cards">card collection</a> shows how picks level up.</p><p>Still stuck? Ask the chat assistant on any page, or open <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>.</p></section>
|
<section class="card"><h2>Check it yourself</h2><p>The <a href="/contract">contract page</a> reads the DraftPosition contract live from Polygon, and the <a href="/ledger">ledger</a> lists every payment with its transaction. The <a href="/cards">card collection</a> shows how picks level up.</p><p>Still stuck? Ask the chat assistant on any page, or open <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>.</p></section>
|
||||||
<p class="small">A position buys a draft spot and coaching tools, not income. Nothing is promised.</p>
|
<p class="small">A position buys a draft spot and coaching tools, not income. Nothing is promised.</p>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=5"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/misc.js?v=4"></script>
|
<script src="/assets/misc.js?v=4"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@
|
|||||||
</main>
|
</main>
|
||||||
<!-- PolHunter mission (every rebuilt network site gets one, Marty 2026-11-14): the 3 How The Draft steps -->
|
<!-- PolHunter mission (every rebuilt network site gets one, Marty 2026-11-14): the 3 How The Draft steps -->
|
||||||
<script src="https://polhunter.com/embed.js" data-slots="3" data-selector=".how .s" async></script>
|
<script src="https://polhunter.com/embed.js" data-slots="3" data-selector=".how .s" async></script>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/board.js?v=3"></script>
|
<script src="/assets/board.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@
|
|||||||
<p class="small">Your sponsor gets 25% and levels 2 to 5 of your network sponsor line get 5% each. Only people who hold a position can receive a share: anyone in your line who does not is passed over and the share goes up to the next person who does. 10% goes to the weekly Best Coach pot and 45% to 5xYourTeam. The contract keeps nothing. Check it on the <a href="/contract">contract page</a> and every payment on the <a href="/ledger">ledger</a>.</p>
|
<p class="small">Your sponsor gets 25% and levels 2 to 5 of your network sponsor line get 5% each. Only people who hold a position can receive a share: anyone in your line who does not is passed over and the share goes up to the next person who does. 10% goes to the weekly Best Coach pot and 45% to 5xYourTeam. The contract keeps nothing. Check it on the <a href="/contract">contract page</a> and every payment on the <a href="/ledger">ledger</a>.</p>
|
||||||
<p class="small">A position buys a draft spot and coaching tools, not income. Nothing is promised.</p></section>
|
<p class="small">A position buys a draft spot and coaching tools, not income. Nothing is promised.</p></section>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/wallet.js?v=3"></script>
|
<script src="/assets/wallet.js?v=3"></script>
|
||||||
<script src="/assets/join.js?v=3"></script>
|
<script src="/assets/join.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
<section class="panel"><div class="tbl"><table id="rows"><thead><tr><th>WHEN</th><th>POSITION</th><th>PAID IN THE SAME TRANSACTION</th><th></th></tr></thead><tbody></tbody></table></div></section>
|
<section class="panel"><div class="tbl"><table id="rows"><thead><tr><th>WHEN</th><th>POSITION</th><th>PAID IN THE SAME TRANSACTION</th><th></th></tr></thead><tbody></tbody></table></div></section>
|
||||||
<section class="panel"><h3 style="font-size:24px">Best Coach payouts</h3><div class="tbl"><table id="payouts"><thead><tr><th>WEEK</th><th>COACH</th><th>POL</th><th></th></tr></thead><tbody></tbody></table></div></section>
|
<section class="panel"><h3 style="font-size:24px">Best Coach payouts</h3><div class="tbl"><table id="payouts"><thead><tr><th>WEEK</th><th>COACH</th><th>POL</th><th></th></tr></thead><tbody></tbody></table></div></section>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/ledger.js?v=3"></script>
|
<script src="/assets/ledger.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@
|
|||||||
<section class="card"><h2>Your choices</h2><p>You can ask us to remove your account and messages here. Records on the blockchain cannot be removed by anyone.</p></section>
|
<section class="card"><h2>Your choices</h2><p>You can ask us to remove your account and messages here. Records on the blockchain cannot be removed by anyone.</p></section>
|
||||||
<section class="card"><h2>Contact</h2><p>TrustClickz. <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Network support</a>. Last updated November 15, 2026.</p></section>
|
<section class="card"><h2>Contact</h2><p>TrustClickz. <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Network support</a>. Last updated November 15, 2026.</p></section>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/misc.js?v=3"></script>
|
<script src="/assets/misc.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
<p id="status" class="note" hidden></p>
|
<p id="status" class="note" hidden></p>
|
||||||
<div id="kit" style="display:flex;flex-direction:column;gap:16px"></div>
|
<div id="kit" style="display:flex;flex-direction:column;gap:16px"></div>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/kitpage.js?v=3"></script>
|
<script src="/assets/kitpage.js?v=3"></script>
|
||||||
<script src="/assets/misc.js?v=3"></script>
|
<script src="/assets/misc.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/wallet.js?v=3"></script>
|
<script src="/assets/wallet.js?v=3"></script>
|
||||||
<script src="/assets/team.js?v=4"></script>
|
<script src="/assets/team.js?v=4"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@
|
|||||||
<section class="card"><h2>The service</h2><p>The site is provided as it is. We work to keep it running but cannot promise it will always be available or free of errors. The smart contract runs on Polygon on its own; its rules are public on the <a href="/contract">contract page</a>. We may change features, draft settings, the price of future positions or these terms; changes apply from the date they are posted here. As far as the law allows, our total responsibility to you is limited to what you paid for the purchase in question. These terms are governed by the laws of the State of Alabama, USA.</p></section>
|
<section class="card"><h2>The service</h2><p>The site is provided as it is. We work to keep it running but cannot promise it will always be available or free of errors. The smart contract runs on Polygon on its own; its rules are public on the <a href="/contract">contract page</a>. We may change features, draft settings, the price of future positions or these terms; changes apply from the date they are posted here. As far as the law allows, our total responsibility to you is limited to what you paid for the purchase in question. These terms are governed by the laws of the State of Alabama, USA.</p></section>
|
||||||
<section class="card"><h2>Contact</h2><p>TrustClickz. <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Network support</a>. Last updated November 15, 2026.</p></section>
|
<section class="card"><h2>Contact</h2><p>TrustClickz. <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Network support</a>. Last updated November 15, 2026.</p></section>
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/common.js?v=4"></script>
|
<script src="/assets/common.js?v=20261117z"></script>
|
||||||
<script src="/assets/misc.js?v=3"></script>
|
<script src="/assets/misc.js?v=3"></script>
|
||||||
<script src="/assets/chat.js?v=2" defer></script>
|
<script src="/assets/chat.js?v=2" defer></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -450,6 +450,19 @@ const server = http.createServer(async (req, res) => {
|
|||||||
const row = { rank: Number(b.rank) || l.length + 1, coach: String(b.coach).toLowerCase(), username: display(String(b.coach).toLowerCase()), wei: String(BigInt(b.wei || 0)), tx: String(b.tx).toLowerCase(), at: Date.now() };
|
const row = { rank: Number(b.rank) || l.length + 1, coach: String(b.coach).toLowerCase(), username: display(String(b.coach).toLowerCase()), wei: String(BigInt(b.wei || 0)), tx: String(b.tx).toLowerCase(), at: Date.now() };
|
||||||
l.push(row); store.save(); proof.payoutLine(b.week, row).catch(() => {}); return json(res, 200, { ok: true, row });
|
l.push(row); store.save(); proof.payoutLine(b.week, row).catch(() => {}); return json(res, 200, { ok: true, row });
|
||||||
}
|
}
|
||||||
|
// the network hub's admin member lookup (2026-11-17, read-only, like ViralAdBlitz): ?q=<wallet | @username> ->
|
||||||
|
// { address, record, positions, purchases, picks, credits }; never a session or contact data
|
||||||
|
if (p === '/api/admin/member-lookup' && req.method === 'GET') {
|
||||||
|
const q = String(u.searchParams.get('q') || '').trim().replace(/^@/, ''); let a = null;
|
||||||
|
if (ADDR_RE.test(q)) a = q.toLowerCase(); else if (NAME_RE.test(q)) { const m = store.memberByName(q); a = m ? m.address : null; }
|
||||||
|
if (!a) return json(res, 404, { error: 'not found' });
|
||||||
|
const m = store.member(a); if (!m && !store.positionsOf(a)) return json(res, 200, { address: a, known: false });
|
||||||
|
const rec = m ? { username: m.username || null, hubId: m.hubId || null, joinedAt: m.joinedAt || null, lastSeen: m.lastSeen || null, via: m.via || null, netOk: !!m.netOk } : null;
|
||||||
|
const mine = store.picksOf(a); const cnt = s => mine.filter(x => x.status === s).length;
|
||||||
|
return json(res, 200, { address: a, record: rec, positions: store.positionsOf(a), credits: store.credits(a),
|
||||||
|
purchases: store.purchases().filter(x => x.buyer === a).map(x => ({ at: x.blockAt ? x.blockAt * 1000 : x.at || null, qty: Number(x.qty) || 1, tx: String(x.key || '').split(':')[0] || x.tx || null })),
|
||||||
|
picks: { all: mine.length, open: cnt('open'), done: cnt('done'), returned: cnt('returned'), kept: cnt('kept') } });
|
||||||
|
}
|
||||||
if (p === '/api/admin/oldrefs' && req.method === 'POST') {
|
if (p === '/api/admin/oldrefs' && req.method === 'POST') {
|
||||||
let b; try { b = JSON.parse((await readRaw(req, 4 * 1024 * 1024)).toString('utf8')); } catch (e) { return json(res, 400, { error: 'bad json' }); }
|
let b; try { b = JSON.parse((await readRaw(req, 4 * 1024 * 1024)).toString('utf8')); } catch (e) { return json(res, 400, { error: 'bad json' }); }
|
||||||
if (!b || !b.oldrefs || typeof b.oldrefs !== 'object') return json(res, 400, { error: 'oldrefs object required' });
|
if (!b || !b.oldrefs || typeof b.oldrefs !== 'object') return json(res, 400, { error: 'oldrefs object required' });
|
||||||
@@ -462,7 +475,7 @@ const server = http.createServer(async (req, res) => {
|
|||||||
|
|
||||||
if (p.startsWith('/api/')) return json(res, 404, { error: 'Not found' });
|
if (p.startsWith('/api/')) return json(res, 404, { error: 'Not found' });
|
||||||
res.writeHead(404, headers({ 'Content-Type': 'text/html; charset=utf-8' }));
|
res.writeHead(404, headers({ 'Content-Type': 'text/html; charset=utf-8' }));
|
||||||
return res.end('<!doctype html><meta name="viewport" content="width=device-width,initial-scale=1"><title>Not found | 5xYourTeam</title><body style="background:#0b1530;color:#eef2fb;font-family:Inter,system-ui,sans-serif;text-align:center;padding:40px 16px"><p style="font-size:22px;font-weight:700">Not found.</p><p><a style="color:#ffc93c;font-weight:700" href="/">Back to the draft board</a></p></body>');
|
return res.end('<!doctype html><meta name="viewport" content="width=device-width,initial-scale=1"><title>Not found | 5xYourTeam</title><body style="background:#0b1530;color:#eef2fb;font-family:Inter,system-ui,sans-serif;text-align:center;padding:40px 16px"><p style="font-size:22px;font-weight:700">Not found.</p><p><a style="color:#ffc93c;font-weight:700" href="/">Back to the draft board</a></p><p style="font-size:11px;margin:24px 0 4px;opacity:.7">Network</p><script async src="https://linkspin.app/z.js" data-zone="ls-a8a737"></script></body>');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('request', p, e.message);
|
console.error('request', p, e.message);
|
||||||
if (!res.headersSent) json(res, 500, { error: 'Server error' });
|
if (!res.headersSent) json(res, 500, { error: 'Server error' });
|
||||||
|
|||||||
Reference in New Issue
Block a user