From 44394f2acff9156a0b5e4c1e06f76d764b4e928b Mon Sep 17 00:00:00 2001 From: Artem Otliaguzov Date: Wed, 24 Jul 2024 10:35:05 +0200 Subject: [PATCH] fix notification problem --- app/Http/Controllers/FederationController.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Http/Controllers/FederationController.php b/app/Http/Controllers/FederationController.php index 16225fb..4da909b 100644 --- a/app/Http/Controllers/FederationController.php +++ b/app/Http/Controllers/FederationController.php @@ -130,8 +130,8 @@ public function update(UpdateFederation $request, Federation $federation) $this->authorize('update', $federation); $name = $federation->name; - $federation->forceDelete(); NotificationService::sendModelNotification($federation, new FederationRejected($name)); + $federation->forceDelete(); return redirect('federations') ->with('status', __('federations.rejected', ['name' => $name])); @@ -227,8 +227,6 @@ public function update(UpdateFederation $request, Federation $federation) Notification::sendNow($new_operators, new YourFederationRightsChanged($federation, 'added')); NotificationService::sendOperatorNotification($old_operators, new FederationOperatorsChanged($federation, $new_operators, 'added')); - - return redirect() ->route('federations.operators', $federation) ->with('status', __('federations.operators_added')); @@ -252,7 +250,6 @@ public function update(UpdateFederation $request, Federation $federation) Notification::sendNow($old_operators, new YourFederationRightsChanged($federation, 'deleted')); NotificationService::sendOperatorNotification($new_operators, new FederationOperatorsChanged($federation, $old_operators, 'added')); - return redirect() ->route('federations.operators', $federation) ->with('status', __('federations.operators_deleted')); @@ -282,7 +279,6 @@ public function update(UpdateFederation $request, Federation $federation) //TODO add members to federation // GitAddMembers::dispatch($federation, $new_entities, Auth::user()); - return redirect() ->route('federations.entities', $federation) ->with('status', __('federations.entities_added'));