Commit 3189f122 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix(fediverse): update post controller namespace in routes

parent 18fcb5ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -231,7 +231,7 @@ $routes->group('@(:podcastHandle)', static function ($routes): void {
                    'controller-method' => 'PostController::index/$2',
                ],
                'application/ld+json; profile="https://www.w3.org/ns/activitystreams' => [
                    'namespace'         => 'Modules/Fediverse/Controllers',
                    'namespace'         => 'Modules\Fediverse\Controllers',
                    'controller-method' => 'PostController::index\$2',
                ],
            ],
+4 −0
Original line number Diff line number Diff line
@@ -50,6 +50,10 @@ class PostController extends Controller

    public function _remap(string $method, string ...$params): mixed
    {
        if (count($params) === 0) {
            throw PageNotFoundException::forPageNotFound();
        }

        if (! ($post = model('PostModel', false)->getPostById($params[0])) instanceof Post) {
            throw PageNotFoundException::forPageNotFound();
        }