diff --git a/CHANGELOG.md b/CHANGELOG.md index 96cc20da..62388ea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ The complete changelog for the Costs to Expect REST API, our changelog follows the format defined at https://keepachangelog.com/en/1.0.0/ +## [v2.08.1] - 2020-02-27 +### Fixed +- Select the correct year when validating the min and max year for year validation. +- The logo on the welcome page will redirect you to the API, not the app dashboard. + ## [v2.08.0] - 2020-02-26 ### Added - We have added a new item type, `simple item`. We intend that the 'simple item' type is useful for managing collections. The API will now allow you to list, add, edit and delete them. diff --git a/app/Validators/Parameters.php b/app/Validators/Parameters.php index 4b298649..b4d8df83 100644 --- a/app/Validators/Parameters.php +++ b/app/Validators/Parameters.php @@ -3,7 +3,8 @@ namespace App\Validators; -use App\ResourceTypeItem\Factory; +use App\ResourceTypeItem\Factory as ResourceTypeItemFactory; +use App\Item\Factory as ItemFactory; use App\Models\Category; use App\Models\ResourceType; use App\Models\Subcategory; @@ -29,6 +30,7 @@ class Parameters private static function find(array $parameter_names = []) { $request_parameters = request()->all(); + self::$parameters = []; foreach ($parameter_names as $parameter) { @@ -139,13 +141,13 @@ private static function validate(?int $resource_type_id, ?int $resource_id) $max_year_limit = intval(Date('Y')); if ($resource_type_id !== null && $resource_id === null) { - $item_interface = Factory::item($resource_type_id); + $item_interface = ResourceTypeItemFactory::item($resource_type_id); $min_year_limit = $item_interface->conditionalParameterMinYear($resource_type_id); $max_year_limit = $item_interface->conditionalParameterMaxYear($resource_type_id); } if ($resource_type_id !== null && $resource_id !== null) { - $item_interface = Factory::item($resource_type_id); + $item_interface = ItemFactory::item($resource_type_id); $min_year_limit = $item_interface->conditionalParameterMinYear($resource_id); $max_year_limit = $item_interface->conditionalParameterMaxYear($resource_id); } diff --git a/config/api/app/version.php b/config/api/app/version.php index 4ff45c95..95ce3cbf 100644 --- a/config/api/app/version.php +++ b/config/api/app/version.php @@ -3,9 +3,9 @@ declare(strict_types=1); return [ - 'version'=> '2.08.0', + 'version'=> '2.08.1', 'prefix' => 'v2', - 'release_date' => '2020-02-26', + 'release_date' => '2020-02-27', 'changelog' => [ 'api' => '/v2/changelog', 'markdown' => 'https://github.com/costs-to-expect/api/blob/master/CHANGELOG.md' diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 3ab3f33a..c6dd999d 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -31,7 +31,7 @@