X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FLike.php;h=727aa5ddfe1389d31aa23579841e9c8224e7f4a9;hb=aa0b485f3dca72c5448076e913fa54d948cd7731;hp=a85044714f582f77718d1ab7b937585f88094762;hpb=0e05ff68686270d87447c570e28543a5bcc7e755;p=friendica.git diff --git a/src/Module/Like.php b/src/Module/Like.php index a85044714f..727aa5ddfe 100644 --- a/src/Module/Like.php +++ b/src/Module/Like.php @@ -22,6 +22,7 @@ namespace Friendica\Module; use Friendica\BaseModule; +use Friendica\Core\System; use Friendica\DI; use Friendica\Model\Item; use Friendica\Core\Session; @@ -50,7 +51,7 @@ class Like extends BaseModule // @TODO: Replace with parameter from router $itemId = (($app->argc > 1) ? Strings::escapeTags(trim($app->argv[1])) : 0); - if (!Item::performLike($itemId, $verb)) { + if (!Item::performActivity($itemId, $verb, local_user())) { throw new HTTPException\BadRequestException(); } @@ -68,5 +69,7 @@ class Like extends BaseModule DI::baseUrl()->redirect($returnPath . $rand); } + + System::jsonExit(['status' => 'OK']); } }