corrected spacing

pull/551/head v.3.5.1
n0nag0n 11 months ago
parent d8aa490dbd
commit 2439f20d27

@ -743,9 +743,9 @@ class Engine
->status($code)
->header('Content-Type', 'application/json; charset=' . $charset)
->write($json);
if($this->response()->v2_output_buffering === true) {
$this->response()->send();
}
if ($this->response()->v2_output_buffering === true) {
$this->response()->send();
}
}
/**

@ -23,9 +23,9 @@ Flight::group('', function () {
// Test 1: Root route
Flight::route('/', function () {
echo '<span id="infotext">Route text:</span> Root route works!';
if(Flight::request()->query->redirected) {
echo '<br>Redirected from /redirect route successfully!';
}
if (Flight::request()->query->redirected) {
echo '<br>Redirected from /redirect route successfully!';
}
});
Flight::route('/querytestpath', function () {
echo '<span id="infotext">Route text:</span> This ir query route<br>';
@ -99,22 +99,21 @@ Flight::group('', function () {
trigger_error('This is a successful error');
});
// Test 10: Halt
Flight::route('/halt', function() {
Flight::halt(400, 'Halt worked successfully');
});
// Test 10: Halt
Flight::route('/halt', function () {
Flight::halt(400, 'Halt worked successfully');
});
}, [ new LayoutMiddleware() ]);
// Test 9: JSON output
Flight::route('/json', function() {
Flight::json(['message' => 'JSON renders successfully!']);
Flight::route('/json', function () {
Flight::json(['message' => 'JSON renders successfully!']);
});
// Test 11: Redirect
Flight::route('/redirect', function() {
Flight::redirect('/?redirected=1');
Flight::route('/redirect', function () {
Flight::redirect('/?redirected=1');
});
Flight::map('error', function (Throwable $e) {

Loading…
Cancel
Save