mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-08 01:14:29 +01:00
Remove inconsistent icon delete
This commit is contained in:
parent
7bef68e731
commit
faada93720
@ -106,10 +106,6 @@ public function update(TwoFAccount $twofaccount, array $data) : TwoFAccount
|
||||
$twofaccount->icon = Arr::get($data, 'icon', null);
|
||||
$twofaccount->save();
|
||||
|
||||
if (is_null($twofaccount->icon)) {
|
||||
$this->deleteIcon($twofaccount->icon);
|
||||
}
|
||||
|
||||
return $twofaccount;
|
||||
}
|
||||
|
||||
@ -421,14 +417,4 @@ private function storeTokenImageAsIcon() : string
|
||||
// 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…
Reference in New Issue
Block a user