diff --git a/config/routes.php b/config/routes.php index 024f47e..270679d 100644 --- a/config/routes.php +++ b/config/routes.php @@ -53,6 +53,7 @@ Router::scope('/', function (RouteBuilder $routes) { $routes->connect('/stats', ['controller' => 'Main', 'action' => 'stats']); $routes->connect('/tx/*', ['controller' => 'Main', 'action' => 'tx']); $routes->connect('/qr/*', ['controller' => 'Main', 'action' => 'qr']); + $routes->connect('/*', ['controller' => 'Main', 'action' => 'index']); $routes->connect('/api/v1/address/:addr/tag', ['controller' => 'Main', 'action' => 'apiaddrtag'], ['addr' => '[A-Za-z0-9,]+', 'pass' => ['addr']]); $routes->connect('/api/v1/address/:addr/utxo', ['controller' => 'Main', 'action' => 'apiaddrutxo'], ['addr' => '[A-Za-z0-9,]+', 'pass' => ['addr']]); diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index efc2036..5c773fd 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -448,10 +448,6 @@ class MainController extends AppController { $this->loadModel('Outputs'); $sourceAddress = $this->request->query('address'); - if (!$hash) { - return $this->redirect('/'); - } - $tx = $this->Transactions->find()->select( ['Id', 'BlockHash', 'InputCount', 'OutputCount', 'Hash', 'Value', 'TransactionTime', 'TransactionSize', 'Created', 'Version', 'LockTime', 'Raw'])->where(['Hash' => $hash])->first(); if (!$tx) { diff --git a/src/Template/Layout/default.ctp b/src/Template/Layout/default.ctp index f2a365d..8d8f5a6 100644 --- a/src/Template/Layout/default.ctp +++ b/src/Template/Layout/default.ctp @@ -34,6 +34,28 @@ + + fetch('meta') ?> fetch('css') ?> fetch('script') ?> @@ -49,4 +71,3 @@ -