Log activity when modifying account details

This commit is contained in:
DaneEveritt 2022-05-29 18:48:35 -04:00
parent 0b2c0db170
commit 287fd60891
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
15 changed files with 85 additions and 57 deletions

View file

@ -5,8 +5,8 @@ namespace Pterodactyl\Services\Activity;
use Illuminate\Support\Arr;
use Webmozart\Assert\Assert;
use Illuminate\Support\Collection;
use Pterodactyl\Models\ActivityLog;
use Illuminate\Support\Facades\Log;
use Pterodactyl\Models\ActivityLog;
use Illuminate\Contracts\Auth\Factory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Request;
@ -148,6 +148,11 @@ class ActivityLogService
try {
return $this->save();
} catch (\Throwable|\Exception $exception) {
if (config('app.env') !== 'production') {
/* @noinspection PhpUnhandledExceptionInspection */
throw $exception;
}
Log::error($exception);
}