summaryrefslogtreecommitdiff
path: root/controllers/editor.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2017-01-06 11:00:17 -0800
committerAaron Parecki <aaron@parecki.com>2017-01-06 11:00:17 -0800
commitbdff359178d6696d1934a3e350d6cd1b33282251 (patch)
treeb1248b230161cfef705dce25995a48b0c9841f3e /controllers/editor.php
parent787cb681305d093c471a81ccae1440e3eafd73cb (diff)
support rich editor in logged-out mode
Diffstat (limited to 'controllers/editor.php')
-rw-r--r--controllers/editor.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/controllers/editor.php b/controllers/editor.php
index 0f4380b..bfe70af 100644
--- a/controllers/editor.php
+++ b/controllers/editor.php
@@ -1,12 +1,11 @@
<?php
$app->get('/editor', function() use($app) {
- if($user=require_login($app)) {
- $html = $app->render('editor.php', [
- 'user' => $user
- ]);
- $app->response()->body($html);
- }
+ $user = require_login($app, false);
+ $html = $app->render('editor.php', [
+ 'user' => $user
+ ]);
+ $app->response()->body($html);
});
$app->post('/editor/publish', function() use($app) {