mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
max results per page improvement
This commit is contained in:
parent
fe92476815
commit
4cf1fb2926
@ -5,13 +5,12 @@ namespace App\Rules\Attributes;
|
||||
use App\Rules\MaxResultsPerPageRule;
|
||||
use Attribute;
|
||||
use Spatie\LaravelData\Attributes\Validation\Rule;
|
||||
use Illuminate\Support\Facades\App;
|
||||
|
||||
#[Attribute(Attribute::TARGET_PROPERTY)]
|
||||
final class MaxLimitWithFallback extends Rule
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(new MaxResultsPerPageRule(App::make("jikan-config")->maxResultsPerPage()));
|
||||
parent::__construct(new MaxResultsPerPageRule(max_results_per_page()));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user