Update rate limits, fixes #4537

This commit is contained in:
Daniel Supernault 2023-07-13 21:38:18 -06:00
parent 9233cd8f5b
commit 1cc6274ac0
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
3 changed files with 7 additions and 7 deletions

View file

@ -1621,7 +1621,7 @@ class ApiV1Controller extends Controller
$limitReached = Cache::remember($limitKey, $limitTtl, function() use($user) {
$dailyLimit = Media::whereUserId($user->id)->where('created_at', '>', now()->subDays(1))->count();
return $dailyLimit >= 250;
return $dailyLimit >= 1250;
});
abort_if($limitReached == true, 429);
@ -1826,7 +1826,7 @@ class ApiV1Controller extends Controller
$limitReached = Cache::remember($limitKey, $limitTtl, function() use($user) {
$dailyLimit = Media::whereUserId($user->id)->where('created_at', '>', now()->subDays(1))->count();
return $dailyLimit >= 250;
return $dailyLimit >= 1250;
});
abort_if($limitReached == true, 429);
@ -2838,7 +2838,7 @@ class ApiV1Controller extends Controller
->where('created_at', '>', now()->subDays(1))
->count();
return $dailyLimit >= 100;
return $dailyLimit >= 1000;
});
abort_if($limitReached == true, 429);

View file

@ -225,7 +225,7 @@ class ApiV2Controller extends Controller
$limitReached = Cache::remember($limitKey, $limitTtl, function() use($user) {
$dailyLimit = Media::whereUserId($user->id)->where('created_at', '>', now()->subDays(1))->count();
return $dailyLimit >= 250;
return $dailyLimit >= 1250;
});
abort_if($limitReached == true, 429);

View file

@ -98,7 +98,7 @@ class ComposeController extends Controller
$limitReached = Cache::remember($limitKey, $limitTtl, function() use($user) {
$dailyLimit = Media::whereUserId($user->id)->where('created_at', '>', now()->subDays(1))->count();
return $dailyLimit >= 250;
return $dailyLimit >= 1250;
});
abort_if($limitReached == true, 429);
@ -190,7 +190,7 @@ class ComposeController extends Controller
$limitReached = Cache::remember($limitKey, $limitTtl, function() use($user) {
$dailyLimit = Media::whereUserId($user->id)->where('created_at', '>', now()->subDays(1))->count();
return $dailyLimit >= 500;
return $dailyLimit >= 1500;
});
abort_if($limitReached == true, 429);
@ -499,7 +499,7 @@ class ComposeController extends Controller
->where('created_at', '>', now()->subDays(1))
->count();
return $dailyLimit >= 100;
return $dailyLimit >= 1000;
});
abort_if($limitReached == true, 429);