Remove inconsistent icon delete

This commit is contained in:
Bubka 2021-10-08 23:16:12 +02:00
parent 7bef68e731
commit faada93720

View File

@ -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);
}
}