mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-16 21:17:45 +02:00
refactor: use Validation::getValidated() when using $this->validate() in controllers
This commit is contained in:
parent
ff0e681763
commit
2c07070b2c
18 changed files with 129 additions and 70 deletions
|
|
@ -70,7 +70,9 @@ class LockController extends BaseController
|
|||
->with('errors', $this->validator->getErrors());
|
||||
}
|
||||
|
||||
$token = (string) $this->request->getPost('token');
|
||||
$validData = $this->validator->getValidated();
|
||||
|
||||
$token = $validData['token'];
|
||||
|
||||
// attempt unlocking the podcast with the token
|
||||
if (! $this->premiumPodcasts->unlock($this->podcast->handle, $token)) {
|
||||
|
|
@ -83,7 +85,8 @@ class LockController extends BaseController
|
|||
$redirectURL = session('redirect_url') ?? site_url('/');
|
||||
unset($_SESSION['redirect_url']);
|
||||
|
||||
return redirect()->to($redirectURL)
|
||||
return redirect()
|
||||
->to($redirectURL)
|
||||
->withCookies()
|
||||
->with('message', lang('PremiumPodcasts.messages.unlockSuccess'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue