mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-21 12:32:04 +02:00
Remove inconsistent icon delete
This commit is contained in:
parent
7bef68e731
commit
faada93720
@ -106,10 +106,6 @@ class TwoFAccountService
|
|||||||
$twofaccount->icon = Arr::get($data, 'icon', null);
|
$twofaccount->icon = Arr::get($data, 'icon', null);
|
||||||
$twofaccount->save();
|
$twofaccount->save();
|
||||||
|
|
||||||
if (is_null($twofaccount->icon)) {
|
|
||||||
$this->deleteIcon($twofaccount->icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $twofaccount;
|
return $twofaccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -421,14 +417,4 @@ class TwoFAccountService
|
|||||||
// TODO : log the error
|
// TODO : log the error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Deletes an icon
|
|
||||||
*
|
|
||||||
* @param string $filename The icon filename
|
|
||||||
*/
|
|
||||||
private function deleteIcon(string $filename) : void
|
|
||||||
{
|
|
||||||
Storage::delete('public/icons/' . $filename);
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user