Skip to content

Commit

Permalink
fix notification problem
Browse files Browse the repository at this point in the history
  • Loading branch information
temaotl committed Jul 24, 2024
1 parent 89a2074 commit 44394f2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/Http/Controllers/FederationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
Expand Down Expand Up @@ -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'));
Expand All @@ -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'));
Expand Down Expand Up @@ -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'));
Expand Down

0 comments on commit 44394f2

Please sign in to comment.