Fix game management save/retrieve; add last-edited to game cards

Root cause: saves went through admin.php which still used old console_url column
and had broken response using undefined $sent variable (always returned error).

- api/admin.php: platforms_create/update/delete fully rewritten with all agent
  fields, master-admin gating, and correct json_encode responses
- api/admin.php: update now sets updated_at=NOW() on save
- admin/index.php: game cards show last-edited date (✏️ from updated_at)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 18:15:55 +00:00
parent 7eade583f7
commit 185c27f6b4
2 changed files with 46 additions and 22 deletions
+1
View File
@@ -2893,6 +2893,7 @@ async function loadGames() {
</div>
<div style="text-align:right;flex-shrink:0">
<div style="font-size:15px;color:var(--text2);margin-bottom:4px">Order: ${g.sort_order}</div>
<div style="font-size:11px;color:var(--text2);margin-bottom:4px" title="Last edited">✏️ ${g.updated_at ? new Date(g.updated_at).toLocaleDateString('en-US',{month:'short',day:'numeric',year:'numeric'}) : '—'}</div>
<div id="credit-total-${g.id}" style="font-family:'Exo 2',sans-serif;font-weight:700;font-size:13px;color:var(--cyan);margin-bottom:6px">💳 —</div>
<div class="game-actions">
<button class="game-edit-btn" style="background:rgba(0,229,255,.1);color:var(--cyan);border:1px solid rgba(0,229,255,.2)" onclick="editGame(${g.id})">✏️ Edit</button>