mirror of
https://code.castopod.org/adaures/castopod
synced 2025-06-06 18:31:05 +00:00
refactor(rector): update contributor controller's remap logic
This commit is contained in:
parent
92536ddb38
commit
cc9e4c7dc7
@ -37,16 +37,17 @@ class ContributorController extends BaseController
|
|||||||
|
|
||||||
$this->podcast = $podcast;
|
$this->podcast = $podcast;
|
||||||
|
|
||||||
if (
|
if (count($params) <= 1) {
|
||||||
count($params) > 1 &&
|
return $this->{$method}();
|
||||||
($this->user = (new UserModel())->getPodcastContributor((int) $params[1], (int) $params[0])) === null
|
|
||||||
) {
|
|
||||||
throw PageNotFoundException::forPageNotFound();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (($this->user = (new UserModel())->getPodcastContributor((int) $params[1], (int) $params[0])) !== null) {
|
||||||
return $this->{$method}();
|
return $this->{$method}();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
throw PageNotFoundException::forPageNotFound();
|
||||||
|
}
|
||||||
|
|
||||||
public function list(): string
|
public function list(): string
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user