mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-29 09:43:16 +00:00
Update rate limits, fixes #4537
This commit is contained in:
parent
9233cd8f5b
commit
1cc6274ac0
3 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue