From 8dec126e7dd19ebb068b1a4f42804f8c0205af9d Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Mon, 30 Mar 2020 10:26:46 -0700 Subject: add channel selection to event interface --- controllers/micropub.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'controllers/micropub.php') diff --git a/controllers/micropub.php b/controllers/micropub.php index 6eacd4a..cc1ca02 100644 --- a/controllers/micropub.php +++ b/controllers/micropub.php @@ -11,6 +11,17 @@ $app->get('/micropub/syndications', function() use($app) { } }); +$app->get('/micropub/channels', function() use($app) { + if($user=require_login($app)) { + $data = get_micropub_config($user, ['q'=>'config']); + $app->response()['Content-type'] = 'application/json'; + $app->response()->body(json_encode(array( + 'channels' => $data['channels'], + 'response' => $data['response'] + ))); + } +}); + $app->post('/micropub/post', function() use($app) { if($user=require_login($app)) { $params = $app->request()->params(); -- cgit v1.2.3