summaryrefslogtreecommitdiff
path: root/controllers/controllers.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2016-02-10 18:41:28 -0800
committerAaron Parecki <aaron@parecki.com>2016-02-10 18:41:28 -0800
commit704241a3a4f3480eb87260aef9fca8f1ce00e638 (patch)
treeb8579b9cf746a32bf533ea15f0c2aa6e82659c47 /controllers/controllers.php
parent022f58d956faaf1a56b80ec25ee4fb06057bc117 (diff)
add dashboard with links to all post types
Diffstat (limited to 'controllers/controllers.php')
-rw-r--r--controllers/controllers.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/controllers/controllers.php b/controllers/controllers.php
index 0b63699..ef619a6 100644
--- a/controllers/controllers.php
+++ b/controllers/controllers.php
@@ -41,6 +41,16 @@ function generate_login_token() {
), Config::$jwtSecret);
}
+$app->get('/dashboard', function() use($app) {
+ if($user=require_login($app)) {
+ $html = render('dashboard', array(
+ 'title' => 'Dashboard',
+ 'authorizing' => false
+ ));
+ $app->response()->body($html);
+ }
+});
+
$app->get('/new', function() use($app) {
if($user=require_login($app)) {
$params = $app->request()->params();