fix: sentry error
This commit is contained in:
parent
8ff7aeb78b
commit
75fe005055
@ -12,7 +12,11 @@ class Invitations extends Component
|
|||||||
|
|
||||||
public function deleteInvitation(int $invitation_id)
|
public function deleteInvitation(int $invitation_id)
|
||||||
{
|
{
|
||||||
TeamInvitation::find($invitation_id)->delete();
|
$initiation_found = TeamInvitation::find($invitation_id);
|
||||||
|
if (!$initiation_found) {
|
||||||
|
return $this->dispatch('error', 'Invitation not found.');
|
||||||
|
}
|
||||||
|
$initiation_found->delete();
|
||||||
$this->refreshInvitations();
|
$this->refreshInvitations();
|
||||||
$this->dispatch('success', 'Invitation revoked.');
|
$this->dispatch('success', 'Invitation revoked.');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user