fix(fediverse): update post controller namespace in routes
This commit is contained in:
parent
18fcb5ba3e
commit
3189f12206
|
@ -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',
|
||||
],
|
||||
],
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue