fixes here and there

This commit is contained in:
ayntk-ai
2024-09-02 19:27:21 +02:00
parent 843e3fb599
commit dfd218ec06
11 changed files with 58 additions and 79 deletions

View File

@@ -3,8 +3,6 @@
namespace App\Livewire\Project;
use App\Models\Project;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Livewire\Component;
class DeleteProject extends Component
@@ -23,12 +21,8 @@ class DeleteProject extends Component
$this->projectName = Project::findOrFail($this->project_id)->name;
}
public function delete($password)
public function delete()
{
if (!Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
return;
}
$this->validate([
'project_id' => 'required|int',
]);