From e71517ef4ca3807e3b4acb60e22e6657cdd4bb3a Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sun, 24 Feb 2019 14:54:50 +0100 Subject: [PATCH] Change routes handling for api and rss --- Changelog | 2 ++ app/Http/Controllers/Api/ApiV2Controller.php | 2 +- app/Http/Controllers/BasePageController.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index f241d949f..8516559b7 100755 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +2019-02-24 DariusIII + * Chg: Change routes handling for api and rss 2019-02-22 DariusIII * Chg: Update middleware in routes/web.php * Chg: Update opis/closure (3.1.5 => 3.1.6) diff --git a/app/Http/Controllers/Api/ApiV2Controller.php b/app/Http/Controllers/Api/ApiV2Controller.php index 1343fa3fe..832d6c589 100644 --- a/app/Http/Controllers/Api/ApiV2Controller.php +++ b/app/Http/Controllers/Api/ApiV2Controller.php @@ -106,7 +106,7 @@ class ApiV2Controller extends BasePageController * @return \Illuminate\Http\JsonResponse * @throws \Exception */ - public function search(Request $request): \Illuminate\Http\JsonResponse + public function apiSearch(Request $request): \Illuminate\Http\JsonResponse { $api = new API(); $releases = new Releases(); diff --git a/app/Http/Controllers/BasePageController.php b/app/Http/Controllers/BasePageController.php index 79e193f4a..f147a739c 100644 --- a/app/Http/Controllers/BasePageController.php +++ b/app/Http/Controllers/BasePageController.php @@ -83,7 +83,7 @@ class BasePageController extends Controller */ public function __construct() { - $this->middleware('auth')->except('api', 'rss', 'contact', 'showContactForm', 'callback', 'getNzb', 'terms', 'capabilities', 'movie', 'search', 'tv', 'details', 'failed'); + $this->middleware(['auth', 'web'])->except('api', 'rss', 'contact', 'showContactForm', 'callback', 'getNzb', 'terms', 'capabilities', 'movie', 'apiSearch', 'tv', 'details', 'failed'); // Buffer settings/DB connection. $this->settings = new Settings(); $this->smarty = app('smarty.view');