[CONTROLLER][ActorController] Make ActorController extend the FeedController, so notes get filtered
This commit is contained in:
parent
7f65b23074
commit
027adc97b2
@ -32,13 +32,13 @@ declare(strict_types = 1);
|
|||||||
|
|
||||||
namespace App\Core\Controller;
|
namespace App\Core\Controller;
|
||||||
|
|
||||||
use App\Core\Controller;
|
|
||||||
use App\Core\DB\DB;
|
use App\Core\DB\DB;
|
||||||
use function App\Core\I18n\_m;
|
use function App\Core\I18n\_m;
|
||||||
|
use App\Core\Router\Router;
|
||||||
use App\Util\Exception\ClientException;
|
use App\Util\Exception\ClientException;
|
||||||
use App\Util\Exception\RedirectException;
|
use App\Util\Exception\RedirectException;
|
||||||
|
|
||||||
abstract class ActorController extends Controller
|
abstract class ActorController extends FeedController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Generic function that handles getting a representation for an actor from id
|
* Generic function that handles getting a representation for an actor from id
|
||||||
@ -47,7 +47,7 @@ abstract class ActorController extends Controller
|
|||||||
{
|
{
|
||||||
$actor = DB::findOneBy('actor', ['id' => $id]);
|
$actor = DB::findOneBy('actor', ['id' => $id]);
|
||||||
if ($actor->getIsLocal()) {
|
if ($actor->getIsLocal()) {
|
||||||
throw new RedirectException($actor->getUrl());
|
throw new RedirectException(url: $actor->getUrl(Router::ABSOLUTE_PATH));
|
||||||
}
|
}
|
||||||
if (empty($actor)) {
|
if (empty($actor)) {
|
||||||
throw new ClientException(_m('No such actor.'), 404);
|
throw new ClientException(_m('No such actor.'), 404);
|
||||||
|
Loading…
Reference in New Issue
Block a user