feat: Hex Wars - Badge in Sidebar und BottomNav wenn man dran ist

This commit is contained in:
2026-06-29 11:47:44 +02:00
parent 4b1e8ae59d
commit ed3e56fb43
2 changed files with 56 additions and 49 deletions

View File

@@ -281,6 +281,16 @@ router.get('/', authenticate, (req, res) => {
res.json(games);
});
// ── Meine Züge: Anzahl Spiele wo ich dran bin ────────────────────────────────
router.get('/my-turns', authenticate, (req, res) => {
const me = uid(req);
const { count } = db.prepare(`
SELECT COUNT(*) as count FROM geo_games
WHERE status='active' AND current_turn=?
`).get(me);
res.json({ count });
});
// ── Topliste ──────────────────────────────────────────────────────────────────
router.get('/leaderboard', authenticate, (req, res) => {
const rows = db.prepare(`