Log twofaccount deletion

This commit is contained in:
Bubka 2022-05-31 23:21:36 +02:00
parent 75860686f7
commit f2716782f7
2 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,7 @@
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
class TwoFAccountDeleted
{
@ -22,5 +23,6 @@ class TwoFAccountDeleted
public function __construct(TwoFAccount $twofaccount)
{
$this->twofaccount = $twofaccount;
Log::info(sprintf('TwoFAccount #%s deleted', $twofaccount->id));
}
}

View File

@ -221,6 +221,7 @@ public function delete($ids) : int
// $ids as string could be a comma-separated list of ids
// so in this case we explode the string to an array
$ids = $this->commaSeparatedToArray($ids);
Log::info(sprintf('Deletion of TwoFAccounts #%s requested', implode(',#', $ids)));
$deleted = TwoFAccount::destroy($ids);
return $deleted;