Fix icon fetched twice or forgotten during import

This commit is contained in:
Bubka 2023-03-29 17:43:41 +02:00
parent 3724f3e87c
commit e4c9e87522
2 changed files with 2 additions and 1 deletions

View File

@ -103,7 +103,7 @@ public function migrate(mixed $migrationPayload) : Collection
try {
$twofaccounts[$key] = new TwoFAccount;
$twofaccounts[$key]->fillWithOtpParameters($parameters);
$twofaccounts[$key]->fillWithOtpParameters($parameters, Arr::has($parameters, 'iconExt'));
if (Arr::has($parameters, 'iconExt')) {
$twofaccounts[$key]->setIcon($parameters['icon_file'], $parameters['iconExt']);
}

View File

@ -308,6 +308,7 @@
this.form.account = twofaccount.account
this.form.service = twofaccount.service
this.form.otp_type = twofaccount.otp_type
this.form.icon = twofaccount.icon
this.form.secret = twofaccount.secret
this.form.algorithm = twofaccount.algorithm
this.form.digits = twofaccount.digits