X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FLike.php;h=ca382475082c6871bcb4305e3e62a00020d07cdf;hb=2d217129b9fb2e4379b728b01ec73fc0be8c58ff;hp=74a0b8d8594eb487c79b22614353efe054268936;hpb=1de3f186d79f3703850524c1d58c237be3eb25f3;p=friendica.git diff --git a/src/Module/Like.php b/src/Module/Like.php index 74a0b8d859..ca38247508 100644 --- a/src/Module/Like.php +++ b/src/Module/Like.php @@ -1,8 +1,28 @@ . + * + */ namespace Friendica\Module; use Friendica\BaseModule; +use Friendica\Core\System; use Friendica\DI; use Friendica\Model\Item; use Friendica\Core\Session; @@ -31,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)) { throw new HTTPException\BadRequestException(); } @@ -47,7 +67,9 @@ class Like extends BaseModule $rand = "?$rand"; } - $app->internalRedirect($returnPath . $rand); + DI::baseUrl()->redirect($returnPath . $rand); } + + System::jsonExit(['status' => 'OK']); } }