summaryrefslogtreecommitdiff
path: root/controllers/micropub.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2020-03-30 10:26:46 -0700
committerAaron Parecki <aaron@parecki.com>2020-03-30 10:26:46 -0700
commit8dec126e7dd19ebb068b1a4f42804f8c0205af9d (patch)
tree03b978cc4772db3e1819e27aa76cccd742a89488 /controllers/micropub.php
parent3759383e91344a6e10d23d4dbd90b9eda513d79c (diff)
add channel selection to event interface
Diffstat (limited to 'controllers/micropub.php')
-rw-r--r--controllers/micropub.php11
1 files changed, 11 insertions, 0 deletions
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();