Browse Source

actually post likes from the form

pull/5/head
Aaron Parecki 9 years ago
parent
commit
875a9fd909
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      controllers/controllers.php

+ 13
- 0
controllers/controllers.php View File

@ -277,6 +277,19 @@ $app->get('/favorite.js', function() use($app) {
} }
}); });
$app->post('/favorite', function() use($app) {
if($user=require_login($app)) {
$params = $app->request()->params();
$r = create_favorite($user, $params['url']);
$app->response()->body(json_encode(array(
'location' => $r['location'],
'error' => $r['error']
)));
}
});
$app->get('/micropub/syndications', function() use($app) { $app->get('/micropub/syndications', function() use($app) {
if($user=require_login($app)) { if($user=require_login($app)) {
$data = get_syndication_targets($user); $data = get_syndication_targets($user);

Loading…
Cancel
Save