Add ResyncAction for Maildispatcher when updating memberships
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Philipp Lang 2023-07-30 11:08:17 +02:00
parent 65aeb4aeaf
commit 891e4deac1
3 changed files with 10 additions and 1 deletions

View File

@ -2,6 +2,7 @@
namespace App\Membership\Actions;
use App\Maildispatcher\Actions\ResyncAction;
use App\Member\Member;
use App\Member\Membership;
use App\Setting\NamiSettings;
@ -16,7 +17,7 @@ class MembershipDestroyAction
public function handle(Member $member, Membership $membership, NamiSettings $settings): void
{
$api = $settings->login();
if ($membership->hasNami) {
$settings->login()->deleteMembership(
$member->nami_id,
@ -39,6 +40,8 @@ class MembershipDestroyAction
$settings,
);
ResyncAction::dispatch();
return redirect()->back();
}
}

View File

@ -4,6 +4,7 @@ namespace App\Membership\Actions;
use App\Activity;
use App\Group;
use App\Maildispatcher\Actions\ResyncAction;
use App\Member\Member;
use App\Member\Membership;
use App\Setting\NamiSettings;
@ -95,6 +96,8 @@ class MembershipStoreAction
$settings,
);
ResyncAction::dispatch();
return redirect()->back();
}
}

View File

@ -3,6 +3,7 @@
namespace App\Membership\Actions;
use App\Activity;
use App\Maildispatcher\Actions\ResyncAction;
use App\Member\Member;
use App\Member\Membership;
use App\Subactivity;
@ -64,6 +65,8 @@ class MembershipUpdateAction
$request->promised_at ? Carbon::parse($request->promised_at) : null,
);
ResyncAction::dispatch();
return redirect()->back();
}
}