Skip to content

Commit

Permalink
make notification to FolderDeleteMembership.php (not tested
Browse files Browse the repository at this point in the history
  • Loading branch information
temaotl committed Jul 23, 2024
1 parent 4069f7c commit 42f5791
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/MembershipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ public function destroy(Membership $membership)

$membership->delete();

$admins = User::activeAdmins()->select('id', 'email')->get();
/* $admins = User::activeAdmins()->select('id', 'email')->get();
Notification::send($operators, new MembershipRejected($entity, $federation));
Notification::send($admins, new MembershipRejected($entity, $federation));
Notification::send($admins, new MembershipRejected($entity, $federation));*/

return redirect()
->back()
Expand Down
4 changes: 4 additions & 0 deletions app/Jobs/FolderDeleteMembership.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use App\Models\Membership;
use App\Notifications\EntityDeletedFromHfd;
use App\Notifications\EntityStateChanged;
use App\Notifications\MembershipRejected;
use App\Services\NotificationService;
use App\Traits\HandlesJobsFailuresTrait;
use Illuminate\Bus\Queueable;
Expand Down Expand Up @@ -58,6 +59,9 @@ public function handle(): void
$lock->block(61);
EntityFacade::deleteEntityMetadataFromFolder($entity->file, $federation->xml_id);


NotificationService::sendEntityNotification($entity,new MembershipRejected($entity->entityid,$federation->name));

RunMdaScript::dispatch($federation, $lock->owner());
} catch (Exception $e) {
$this->fail($e);
Expand Down

0 comments on commit 42f5791

Please sign in to comment.