diff options
| author | Aaron Parecki <aaron@parecki.com> | 2016-03-16 09:24:52 -0400 | 
|---|---|---|
| committer | Aaron Parecki <aaron@parecki.com> | 2016-03-16 09:24:52 -0400 | 
| commit | c62c5205ac7df0dd6b3f47c0ab8376c5c2bfb94b (patch) | |
| tree | 68ffe1a8a0acf0c90746aeb9e405f0707d619cfc /controllers/controllers.php | |
| parent | bcb6300ce5bf9b312d3bf32a0c17508ecc802f91 (diff) | |
crude UI for creating events
Diffstat (limited to 'controllers/controllers.php')
| -rw-r--r-- | controllers/controllers.php | 40 | 
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)) { | 
