Skip to content

Commit

Permalink
Ajuste em prod02
Browse files Browse the repository at this point in the history
  • Loading branch information
ramosbrp committed Jun 27, 2024
1 parent bd7f93d commit dbfdf04
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions controllers/cadastro.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@

if ($stmt->execute()) {
$responseArray = ['success' => true, 'message' => 'Cadastro realizado com sucesso!'];
echo json_encode($responseArray);
// echo"<script>console.log('ok')</script>";
// echo json_encode($responseArray);
echo"<script>console.log('if')</script>";
} else {
throw new Exception("Failed to execute the SQL statement.");
}
} catch (Exception $e) {
echo json_encode(['success' => false, 'message' => $e->getMessage()]);
echo"<script>console.log('$e')</script>";
// echo json_encode(['success' => false, 'message' => $e->getMessage()]);
}
}

0 comments on commit dbfdf04

Please sign in to comment.