From 8dc00a2f17fec93825220d55e7430deac4e67d88 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Wed, 27 Jun 2018 13:14:37 +0200 Subject: [PATCH] Update terms and conditions page handling --- Changelog | 1 + app/Http/Controllers/BasePageController.php | 2 +- app/Http/Controllers/TermsController.php | 2 +- routes/web.php | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 8d7a7c7bc..f2f3bcf6c 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-06-27 DariusIII + * Chg: Update terms and conditions page handling * Chg: Change from timestamps to "normal" dates in some of the time conversion functions * Chg: Remove needles date conversions to timestamp and back in Binaries and Backfill classes * Chg: Update Movie processing handling diff --git a/app/Http/Controllers/BasePageController.php b/app/Http/Controllers/BasePageController.php index 35566f3b6..bacb6864e 100644 --- a/app/Http/Controllers/BasePageController.php +++ b/app/Http/Controllers/BasePageController.php @@ -80,7 +80,7 @@ class BasePageController extends Controller */ public function __construct() { - $this->middleware('auth')->except('api', 'rss', 'contact', 'showContactForm', 'callback', 'getNzb'); + $this->middleware('auth')->except('api', 'rss', 'contact', 'showContactForm', 'callback', 'getNzb', 'terms'); // Buffer settings/DB connection. $this->settings = new Settings(); $this->smarty = app('smarty.view'); diff --git a/app/Http/Controllers/TermsController.php b/app/Http/Controllers/TermsController.php index 4c7327f0a..46b899fd3 100644 --- a/app/Http/Controllers/TermsController.php +++ b/app/Http/Controllers/TermsController.php @@ -9,7 +9,7 @@ class TermsController extends BasePageController /** * @throws \Exception */ - public function index() + public function terms() { $this->setPrefs(); $title = 'Terms and Conditions'; diff --git a/routes/web.php b/routes/web.php index c874ca57b..f1a23afb5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -21,6 +21,8 @@ Route::post('register', 'Auth\RegisterController@register'); Route::get('forgottenpassword', 'Auth\ForgotPasswordController@showLinkRequestForm'); Route::post('forgottenpassword', 'Auth\ForgotPasswordController@showLinkRequestForm'); +Route::get('terms-and-conditions', 'TermsController@terms'); + Route::group(['middleware' => ['isVerified']], function () { Route::get('login', 'Auth\LoginController@showLoginForm'); Route::post('login', 'Auth\LoginController@login')->name('login'); @@ -199,8 +201,6 @@ Route::group(['middleware' => ['isVerified']], function () { Route::post('series/{id?}', 'SeriesController@index'); - Route::get('terms-and-conditions', 'TermsController@index'); - Route::get('nzbvortex', 'QueueController@nzbvortex'); Route::post('nzbvortex', 'QueueController@nzbvortex');