v1.0.0 - Initial release: registration, SendGrid email, Square payments, cashout, admin panel

This commit is contained in:
2026-05-10 14:45:49 -05:00
commit c70027f8fc
61 changed files with 11762 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
ob_start(); // Buffer any accidental output (PHP errors, notices, etc.)
try {
require_once __DIR__ . '/../../includes/auth.php';
} catch (Throwable $e) {
ob_end_clean();
header('Content-Type: application/json');
echo json_encode(['success' => false, 'error' => 'Server error']);
exit;
}
ob_end_clean();
header('Content-Type: application/json');
if (!isLoggedIn()) {
echo json_encode(['success' => false, 'error' => 'Not authenticated']);
exit;
}
try {
$user = currentUser();
} catch (Throwable $e) {
echo json_encode(['success' => false, 'error' => 'DB error']);
exit;
}
if (!$user) {
echo json_encode(['success' => false, 'error' => 'User not found']);
exit;
}
unset($user['password']);
echo json_encode(['success' => true, 'user' => $user]);