fix deprecations
change default statusCode to 200
This commit is contained in:
parent
6c61179546
commit
3d28c44fde
4 changed files with 15 additions and 18 deletions
|
@ -213,13 +213,5 @@ Type::build('timestamp')
|
|||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Only try to load DebugKit in development mode
|
||||
* Debug Kit should not be installed on a production system
|
||||
*/
|
||||
if (Configure::read('debug')) {
|
||||
Plugin::load('DebugKit', ['bootstrap' => true]);
|
||||
}
|
||||
|
||||
Configure::load('lbry');
|
||||
|
||||
|
|
|
@ -71,10 +71,4 @@ Router::scope('/', function (RouteBuilder $routes) {
|
|||
$routes->connect('/api/v1/claims/browse', ['controller' => 'Claims', 'action' => 'apibrowse']);
|
||||
|
||||
//$routes->fallbacks(DashedRoute::class);
|
||||
});
|
||||
|
||||
/**
|
||||
* Load all plugin routes. See the Plugin documentation on
|
||||
* how to customize the loading of plugin routes.
|
||||
*/
|
||||
Plugin::routes();
|
||||
});
|
|
@ -12,6 +12,7 @@
|
|||
* @since 3.3.0
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
namespace App;
|
||||
|
||||
use Cake\Core\Configure;
|
||||
|
@ -40,13 +41,23 @@ class Application extends BaseApplication
|
|||
// Catch any exceptions in the lower layers,
|
||||
// and make an error page/response
|
||||
->add(ErrorHandlerMiddleware::class)
|
||||
|
||||
// Handle plugin/theme assets like CakePHP normally does.
|
||||
->add(AssetMiddleware::class)
|
||||
|
||||
// Apply routing
|
||||
->add(RoutingMiddleware::class);
|
||||
|
||||
return $middleware;
|
||||
}
|
||||
|
||||
public function bootstrap()
|
||||
{
|
||||
parent::bootstrap(); // TODO: Change the autogenerated stub
|
||||
/*
|
||||
* Only try to load DebugKit in development mode
|
||||
* Debug Kit should not be installed on a production system
|
||||
*/
|
||||
if (Configure::read('debug')) {
|
||||
$this->addPlugin(\DebugKit\Plugin::class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ class AppController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
protected function _jsonResponse($object = [], $statusCode = null)
|
||||
protected function _jsonResponse($object = [], $statusCode = 200)
|
||||
{
|
||||
$this->response->withStatus($statusCode);
|
||||
$this->response->withType('json');
|
||||
|
|
Loading…
Reference in a new issue