summaryrefslogtreecommitdiff
path: root/controllers/editor.php
diff options
context:
space:
mode:
Diffstat (limited to 'controllers/editor.php')
-rw-r--r--controllers/editor.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/controllers/editor.php b/controllers/editor.php
index 4c9740b..a3c0496 100644
--- a/controllers/editor.php
+++ b/controllers/editor.php
@@ -1,9 +1,10 @@
<?php
$app->get('/editor', function() use($app) {
- // Don't require login because appcache caches the whole page
- $html = $app->render('editor.php');
- $app->response()->body($html);
+ if($user=require_login($app)) {
+ $html = $app->render('editor.php');
+ $app->response()->body($html);
+ }
});
$app->post('/editor/publish', function() use($app) {
@@ -66,10 +67,3 @@ $app->post('/editor/test-login', function() use($app) {
$app->response()['Content-type'] = 'application/json';
$app->response()->body(json_encode(['logged_in'=>$logged_in]));
});
-
-$app->get('/appcache.manifest', function() use($app) {
- $content = partial('partials/appcache');
-
- $app->response()['Content-type'] = 'text/cache-manifest';
- $app->response()->body($content);
-});