aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-06-21 12:21:31 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commit764d34a7d347d653414e5f5c632e02499edaef04 (patch)
tree1e642a893beefd95bfa82c7beeb416449238b4ec /index.php
parent1b8620b1ad4e2c647ff2d032c8e7c6687b6647a1 (diff)
downloadShaarli-764d34a7d347d653414e5f5c632e02499edaef04.tar.gz
Shaarli-764d34a7d347d653414e5f5c632e02499edaef04.tar.zst
Shaarli-764d34a7d347d653414e5f5c632e02499edaef04.zip
Process token retrieve through Slim controller
Diffstat (limited to 'index.php')
-rw-r--r--index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.php b/index.php
index 1571df60..9202cb84 100644
--- a/index.php
+++ b/index.php
@@ -597,8 +597,7 @@ function renderPage($conf, $pluginManager, $bookmarkService, $history, $sessionM
597 597
598 // Get a fresh token 598 // Get a fresh token
599 if ($targetPage == Router::$GET_TOKEN) { 599 if ($targetPage == Router::$GET_TOKEN) {
600 header('Content-Type:text/plain'); 600 header('Location: ./admin/token');
601 echo $sessionManager->generateToken();
602 exit; 601 exit;
603 } 602 }
604 603
@@ -978,6 +977,7 @@ $app->group('', function () {
978 $this->post('/admin/import', '\Shaarli\Front\Controller\Admin\ImportController:import'); 977 $this->post('/admin/import', '\Shaarli\Front\Controller\Admin\ImportController:import');
979 $this->get('/admin/plugins', '\Shaarli\Front\Controller\Admin\PluginsController:index'); 978 $this->get('/admin/plugins', '\Shaarli\Front\Controller\Admin\PluginsController:index');
980 $this->post('/admin/plugins', '\Shaarli\Front\Controller\Admin\PluginsController:save'); 979 $this->post('/admin/plugins', '\Shaarli\Front\Controller\Admin\PluginsController:save');
980 $this->get('/admin/token', '\Shaarli\Front\Controller\Admin\TokenController:getToken');
981 981
982 $this->get('/links-per-page', '\Shaarli\Front\Controller\Admin\SessionFilterController:linksPerPage'); 982 $this->get('/links-per-page', '\Shaarli\Front\Controller\Admin\SessionFilterController:linksPerPage');
983 $this->get('/visibility/{visibility}', '\Shaarli\Front\Controller\Admin\SessionFilterController:visibility'); 983 $this->get('/visibility/{visibility}', '\Shaarli\Front\Controller\Admin\SessionFilterController:visibility');