corrected spacing

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

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

@ -23,7 +23,7 @@ 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) {
if (Flight::request()->query->redirected) {
echo '<br>Redirected from /redirect route successfully!';
}
});
@ -100,20 +100,19 @@ Flight::group('', function () {
});
// Test 10: Halt
Flight::route('/halt', function() {
Flight::route('/halt', function () {
Flight::halt(400, 'Halt worked successfully');
});
}, [ new LayoutMiddleware() ]);
// Test 9: JSON output
Flight::route('/json', function() {
Flight::route('/json', function () {
Flight::json(['message' => 'JSON renders successfully!']);
});
// Test 11: Redirect
Flight::route('/redirect', function() {
Flight::route('/redirect', function () {
Flight::redirect('/?redirected=1');
});

Loading…
Cancel
Save