actually post likes from the form
This commit is contained in:
parent
8be498a324
commit
875a9fd909
1 changed files with 13 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue