This commit is contained in:
2024-10-28 18:30:03 -04:00
parent e55dc42068
commit 576b1634a6
5 changed files with 45 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ if (!is_null($token)) {
$stmt->close();
$mysqli->close();
header('Content-Type: application/json');
echo '{"success":"' . $response['success'] . '", "isAuthenticated":' . $response['success'] . ', "token":"'. $response['token'] .'", "expires":' . $response['expires'] . ', "message":"' . $response['message'] . '"' . '}';
echo '{"success":"' . $response['success'] . '", "isAuthenticated":' . $response['success'] . ', "token":"'. $response['token'] .'", "expires":' . $response['expires'] . ', "message":"' . $response['message'] . '"}';
return;
}
@@ -83,7 +83,8 @@ if ($result->num_rows > 0) {
$stmt->close();
$mysqli->close();
// Return JSON response
header('Content-Type: application/json');
echo '{"success":"' . $response['success'] . '", "isAuthenticated":' . $response['success'] . ', "token":"'. $response['token'] .'", "expires":' . $response['expires'] . ', "message":"' . $response['message'] . '"' . '}';
echo '{"success":"' . $response['success'] . '", "isAuthenticated":' . $response['success'] . ', "token":"'. $response['token'] .'", "expires":' . $response['expires'] . ', "message":"' . $response['message'] . '"}';