refactor: use enums for auth guards, middleware groups, and rate limits

This commit is contained in:
Roardom
2025-06-22 19:46:13 +00:00
parent cf95a900e5
commit 46bfccc8b7
17 changed files with 146 additions and 47 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ declare(strict_types=1);
namespace App\Jobs;
use App\Enums\GlobalRateLimit;
use App\Models\TmdbCompany;
use App\Models\TmdbCredit;
use App\Models\TmdbGenre;
@@ -74,7 +75,7 @@ class ProcessTvJob implements ShouldQueue
return [
Skip::when(cache()->has("tmdb-tv-scraper:{$this->id}")),
new WithoutOverlapping((string) $this->id)->dontRelease()->expireAfter(30),
new RateLimited('tmdb'),
new RateLimited(GlobalRateLimit::TMDB),
];
}