fix: in dev mode do not ask confirmation on delete

This commit is contained in:
Andras Bacsai
2024-10-01 09:31:01 +02:00
parent 31cf3294bf
commit bcc92e1f32
3 changed files with 20 additions and 6 deletions

View File

@@ -91,10 +91,12 @@ class Danger extends Component
public function delete($password)
{
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
if (isProduction()) {
if (! Hash::check($password, Auth::user()->password)) {
$this->addError('password', 'The provided password is incorrect.');
return;
return;
}
}
if (! $this->resource) {