summaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2016-03-16 09:24:52 -0400
committerAaron Parecki <aaron@parecki.com>2016-03-16 09:24:52 -0400
commitc62c5205ac7df0dd6b3f47c0ab8376c5c2bfb94b (patch)
tree68ffe1a8a0acf0c90746aeb9e405f0707d619cfc /controllers
parentbcb6300ce5bf9b312d3bf32a0c17508ecc802f91 (diff)
crude UI for creating events
Diffstat (limited to 'controllers')
-rw-r--r--controllers/controllers.php40
1 files changed, 26 insertions, 14 deletions
diff --git a/controllers/controllers.php b/controllers/controllers.php
index ef619a6..475e620 100644
--- a/controllers/controllers.php
+++ b/controllers/controllers.php
@@ -140,6 +140,18 @@ $app->get('/favorite', function() use($app) {
}
});
+$app->get('/event', function() use($app) {
+ if($user=require_login($app)) {
+ $params = $app->request()->params();
+
+ $html = render('event', array(
+ 'title' => 'Event',
+ 'authorizing' => false
+ ));
+ $app->response()->body($html);
+ }
+});
+
$app->get('/itinerary', function() use($app) {
if($user=require_login($app)) {
$params = $app->request()->params();
@@ -486,20 +498,6 @@ $app->post('/repost', function() use($app) {
}
});
-$app->post('/itinerary', function() use($app) {
- if($user=require_login($app)) {
- $params = $app->request()->params();
-
- $r = micropub_post_for_user($user, json_decode($params['data'], true), null, true);
-
- $app->response()->body(json_encode(array(
- 'location' => $r['location'],
- 'error' => $r['error'],
- 'response' => $r['response']
- )));
- }
-});
-
$app->get('/micropub/syndications', function() use($app) {
if($user=require_login($app)) {
$data = get_syndication_targets($user);
@@ -531,6 +529,20 @@ $app->post('/micropub/post', function() use($app) {
}
});
+$app->post('/micropub/postjson', function() use($app) {
+ if($user=require_login($app)) {
+ $params = $app->request()->params();
+
+ $r = micropub_post_for_user($user, json_decode($params['data'], true), null, true);
+
+ $app->response()->body(json_encode(array(
+ 'location' => $r['location'],
+ 'error' => $r['error'],
+ 'response' => $r['response']
+ )));
+ }
+});
+
/*
$app->post('/auth/facebook', function() use($app) {
if($user=require_login($app, false)) {