This commit is contained in:
Jester
2026-01-19 08:35:00 +03:00
parent cbbc605336
commit 55b3d5f088
27 changed files with 183 additions and 841 deletions

15
api/check_auth.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
session_start();
if (isset($_SESSION['user_id'])) {
echo json_encode([
'isLoggedIn' => true,
'user' => [
'id' => $_SESSION['user_id'],
'username' => $_SESSION['username']
]
]);
} else {
echo json_encode(['isLoggedIn' => false]);
}
?>