refactor model event again

This commit is contained in:
xiaomlove
2024-04-26 03:21:35 +08:00
parent ae29693549
commit 8a44a0a269
12 changed files with 136 additions and 31 deletions

View File

@@ -4,13 +4,16 @@ namespace App\Providers;
use App\Events\SeedBoxRecordUpdated;
use App\Events\TorrentCreated;
use App\Events\TorrentDeleted;
use App\Events\TorrentUpdated;
use App\Events\UserDestroyed;
use App\Events\UserDisabled;
use App\Listeners\DeductUserBonusWhenTorrentDeleted;
use App\Listeners\FetchTorrentImdb;
use App\Listeners\RemoveOauthTokens;
use App\Listeners\RemoveSeedBoxRecordCache;
use App\Listeners\SyncTorrentToEs;
use App\Listeners\TestTorrentUpdated;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
@@ -27,15 +30,19 @@ class EventServiceProvider extends ServiceProvider
Registered::class => [
SendEmailVerificationNotification::class,
],
TorrentUpdated::class => [
SyncTorrentToEs::class,
],
SeedBoxRecordUpdated::class => [
RemoveSeedBoxRecordCache::class,
],
TorrentUpdated::class => [
SyncTorrentToEs::class,
TestTorrentUpdated::class,
],
TorrentCreated::class => [
FetchTorrentImdb::class,
],
TorrentDeleted::class => [
DeductUserBonusWhenTorrentDeleted::class,
],
UserDisabled::class => [
RemoveOauthTokens::class,
],