X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/b94b945fb03e21a1997cfe6e50148967586cb26d..refs/pull/3850/head:/app/Http/Controllers/Api/ApiController.php diff --git a/app/Http/Controllers/Api/ApiController.php b/app/Http/Controllers/Api/ApiController.php index 65a5bb99f..9652654be 100644 --- a/app/Http/Controllers/Api/ApiController.php +++ b/app/Http/Controllers/Api/ApiController.php @@ -1,30 +1,41 @@ -modifyResults($modifier); + } + return $listing->toResponse(); } /** * Get the validation rules for this controller. + * Defaults to a $rules property but can be a rules() method. */ - public function getValdationRules(): array + public function getValidationRules(): array { + if (method_exists($this, 'rules')) { + return $this->rules(); + } + return $this->rules; } -} \ No newline at end of file +}