Aaron Parecki
8 years ago
No known key found for this signature in database
GPG Key ID: 276C2817346D6056
5 changed files with
38 additions and
36 deletions
-
controllers/auth.php
-
controllers/controllers.php
-
controllers/editor.php
-
controllers/static.php
-
public/index.php
|
|
@ -4,23 +4,6 @@ function buildRedirectURI() { |
|
|
|
return Config::$base_url . 'auth/callback'; |
|
|
|
} |
|
|
|
|
|
|
|
$app->get('/', function($format='html') use($app) { |
|
|
|
$res = $app->response(); |
|
|
|
$params = $app->request()->params(); |
|
|
|
if (k($params, 'me')) { |
|
|
|
$app->redirect('/auth/start?'.http_build_query($params), 302); |
|
|
|
} |
|
|
|
|
|
|
|
ob_start(); |
|
|
|
render('index', array( |
|
|
|
'title' => 'Quill', |
|
|
|
'meta' => '', |
|
|
|
'authorizing' => false |
|
|
|
)); |
|
|
|
$html = ob_get_clean(); |
|
|
|
$res->body($html); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->get('/auth/start', function() use($app) { |
|
|
|
$req = $app->request(); |
|
|
|
|
|
|
|
|
|
@ -221,24 +221,6 @@ $app->post('/prefs', function() use($app) { |
|
|
|
))); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->get('/creating-a-token-endpoint', function() use($app) { |
|
|
|
$app->redirect('http://indiewebcamp.com/token-endpoint', 301); |
|
|
|
}); |
|
|
|
$app->get('/creating-a-micropub-endpoint', function() use($app) { |
|
|
|
$html = render('creating-a-micropub-endpoint', array('title' => 'Creating a Micropub Endpoint', 'authorizing' => false)); |
|
|
|
$app->response()->body($html); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->get('/docs', function() use($app) { |
|
|
|
$html = render('docs', array('title' => 'Documentation', 'authorizing' => false)); |
|
|
|
$app->response()->body($html); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->get('/privacy', function() use($app) { |
|
|
|
$html = render('privacy', array('title' => 'Quill Privacy Policy', 'authorizing' => false)); |
|
|
|
$app->response()->body($html); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->get('/add-to-home', function() use($app) { |
|
|
|
$params = $app->request()->params(); |
|
|
|
header("Cache-Control: no-cache, must-revalidate"); |
|
|
|
|
|
@ -8,7 +8,6 @@ $app->get('/editor', function() use($app) { |
|
|
|
}); |
|
|
|
|
|
|
|
$app->post('/editor/publish', function() use($app) { |
|
|
|
|
|
|
|
if($user=require_login($app)) { |
|
|
|
$params = $app->request()->params(); |
|
|
|
|
|
|
|
|
|
@ -0,0 +1,37 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
$app->get('/', function($format='html') use($app) { |
|
|
|
$res = $app->response(); |
|
|
|
$params = $app->request()->params(); |
|
|
|
if (k($params, 'me')) { |
|
|
|
$app->redirect('/auth/start?'.http_build_query($params), 302); |
|
|
|
} |
|
|
|
|
|
|
|
ob_start(); |
|
|
|
render('index', array( |
|
|
|
'title' => 'Quill', |
|
|
|
'meta' => '', |
|
|
|
'authorizing' => false |
|
|
|
)); |
|
|
|
$html = ob_get_clean(); |
|
|
|
$res->body($html); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->get('/creating-a-token-endpoint', function() use($app) { |
|
|
|
$app->redirect('http://indiewebcamp.com/token-endpoint', 301); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->get('/creating-a-micropub-endpoint', function() use($app) { |
|
|
|
$html = render('creating-a-micropub-endpoint', array('title' => 'Creating a Micropub Endpoint', 'authorizing' => false)); |
|
|
|
$app->response()->body($html); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->get('/docs', function() use($app) { |
|
|
|
$html = render('docs', array('title' => 'Documentation', 'authorizing' => false)); |
|
|
|
$app->response()->body($html); |
|
|
|
}); |
|
|
|
|
|
|
|
$app->get('/privacy', function() use($app) { |
|
|
|
$html = render('privacy', array('title' => 'Quill Privacy Policy', 'authorizing' => false)); |
|
|
|
$app->response()->body($html); |
|
|
|
}); |
|
|
@ -13,6 +13,7 @@ $app = new \Slim\Slim(array( |
|
|
|
|
|
|
|
require 'controllers/auth.php'; |
|
|
|
require 'controllers/controllers.php'; |
|
|
|
require 'controllers/static.php'; |
|
|
|
require 'controllers/editor.php'; |
|
|
|
require 'controllers/hooks.php'; |
|
|
|
|
|
|
|