version 0.8.0

This commit is contained in:
danny 2026-09-18 06:46:56 +02:00
parent f22007003a
commit e5ca9ef194
95 changed files with 5601 additions and 4042 deletions

View file

@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
/** API-Controller (Presence) - 1:1 aus api.php. */
final class PresenceController
{
public function heartbeat(): void
{
$pdo = Database::pdo();
$now = time();
$authUserId = $_SESSION['user_id'] ?? null;
if ($authUserId) {
$pdo->prepare('UPDATE gtl_users SET last_seen=?, current_room=NULL WHERE id=?')
->execute([$now, $authUserId]);
}
respond(['ok' => true]);
}
}