Placement switch: drop the cached member view on change and redraw fresh (Clinton #218 saw 'Team rotation' for up to 2 min after choosing Direct)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -31,5 +31,5 @@
|
||||
</section>
|
||||
</main>
|
||||
<footer class="wrap disclaimer">All figures are read live from the RM Circle smart contract on Polygon and are historical facts, not a promise of future results. Participation involves cryptocurrency and smart-contract risk. Never use funds you cannot afford to lose.<div class="footer-links"><a href="/">Home</a><a href="/contract">Contract Security</a><a href="/disclaimer">Disclaimers</a><a href="/tools">Promo Tools</a><a href="/privacy">Privacy</a><a href="/refunds">Refunds</a></div></footer>
|
||||
<script src="/track.js"></script><script src="/qrlib.js"></script><script src="/rmc-wallet.js?v=20260920"></script><script src="/inapp-browser.js?v=20260920"></script><script src="/profile-gate.js?v=20260917a"></script><script src="/my.js"></script><script src="/payouts.js" defer></script><script src="/chat.js?v=20260920" defer></script><script src="/translate.js" defer></script><script src="/tg-app.js" defer></script><script src="/wallet-notice.js" defer></script> <script src="/announce.js?v=20260929a"></script>
|
||||
<script src="/track.js"></script><script src="/qrlib.js"></script><script src="/rmc-wallet.js?v=20260920"></script><script src="/inapp-browser.js?v=20260920"></script><script src="/profile-gate.js?v=20260917a"></script><script src="/my.js?v=20261002p"></script><script src="/payouts.js" defer></script><script src="/chat.js?v=20260920" defer></script><script src="/translate.js" defer></script><script src="/tg-app.js" defer></script><script src="/wallet-notice.js" defer></script> <script src="/announce.js?v=20260929a"></script>
|
||||
</body></html>
|
||||
|
||||
+1
-1
@@ -849,7 +849,7 @@
|
||||
try{
|
||||
const r=await (await fetch('/api/public/placement',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({mode:m})})).json();
|
||||
if(r&&r.error){ const ex=document.getElementById('plExplain'); if(ex)ex.textContent=r.error; return; }
|
||||
load(d.id); // redraw from the server so the panel and the copy can never disagree
|
||||
try{sessionStorage.setItem('rmc.fresh','1')}catch(e){} load(d.id); // redraw from the server (cache-bypassing) so the panel and the copy can never disagree
|
||||
}catch(e){}
|
||||
};
|
||||
const bt=document.getElementById('plTeam'), bd=document.getElementById('plDirect');
|
||||
|
||||
@@ -1586,6 +1586,7 @@ async function handleApi(req,res,pathname){
|
||||
if(!ps)return json(res,401,{error:'Not signed in.'});
|
||||
const pb=await bodyJson(req).catch(()=>null);
|
||||
const pr=placement.set(ps.id,pb&&pb.mode);
|
||||
try{ memberCache.delete(String(ps.id)); memberCache.delete(Number(ps.id)); }catch(e){} // the dashboard redraws right after; never from the stale copy (Clinton #218, 2026-10-02)
|
||||
return json(res,pr.error?400:200,pr);
|
||||
}
|
||||
if(req.method==='POST'&&pathname==='/api/public/profile/username'){
|
||||
|
||||
Reference in New Issue
Block a user