games_app/backend/dist/controllers/presenceController.js
2026-06-29 15:01:23 +02:00

12 lines
491 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.pingPresence = pingPresence;
const onlinePresence_1 = require("../realtime/redis/onlinePresence");
/** Lightweight heartbeat so idle browsers stay in the app presence set. */
async function pingPresence(req, res) {
const userId = req.user?.userId;
if (userId)
await (0, onlinePresence_1.touchAppPresence)(userId);
res.json({ ok: true });
}
//# sourceMappingURL=presenceController.js.map