Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Nov 22, 2024
1 parent 569560f commit 546bcd0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/Livewire/NavbarDeleteTeam.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Livewire;

use App\Models\InstanceSettings;
use Illuminate\Container\Attributes\Auth as AttributesAuth;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
Expand Down Expand Up @@ -32,7 +31,7 @@ public function delete($password)
$currentTeam->delete();

$currentTeam->members->each(function ($user) use ($currentTeam) {
if ($user->id === AttributesAuth::id()) {
if ($user->id === Auth::id()) {
return;
}
$user->teams()->detach($currentTeam);
Expand Down

0 comments on commit 546bcd0

Please sign in to comment.