From 7b42be793885461141c9173b25ff89558b993449 Mon Sep 17 00:00:00 2001 From: Bohdan Shulha Date: Sun, 11 Aug 2024 18:39:13 +0200 Subject: [PATCH] fix: #116 inertia integration --- app/Http/Middleware/EnsureTeamSubscription.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/Http/Middleware/EnsureTeamSubscription.php b/app/Http/Middleware/EnsureTeamSubscription.php index 2037b51..7c74617 100644 --- a/app/Http/Middleware/EnsureTeamSubscription.php +++ b/app/Http/Middleware/EnsureTeamSubscription.php @@ -20,12 +20,6 @@ public function handle(Request $request, Closure $next): Response $doesntHaveSubscription = $subscription === null || ! $subscription->valid(); if ($doesntHaveSubscription) { - if ($request->isJson()) { - return response()->json([ - 'message' => 'You must have a valid subscription to access this resource.', - ], 403); - } - session()->flash('error', 'You must have a valid subscription to access this resource.'); return redirect()->route('teams.billing.show', $team);