Skip to content

Commit

Permalink
Merge pull request #167 from deanblackborough/v2.08.1
Browse files Browse the repository at this point in the history
v2.08.1
  • Loading branch information
deanblackborough authored Feb 27, 2020
2 parents fa61f44 + e1a5312 commit 0a5e18b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 5 additions & 3 deletions app/Validators/Parameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -29,6 +30,7 @@ class Parameters
private static function find(array $parameter_names = [])
{
$request_parameters = request()->all();

self::$parameters = [];

foreach ($parameter_names as $parameter) {
Expand Down Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions config/api/app/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div class="row">
<div class="col-12">
<div class="logo">
<a href="/dashboard"><img src="https://app.costs-to-expect.com/images/theme/logo-190.png" width="64" height="64" alt="Costs to Expect Logo"
<a href="/"><img src="{{ asset('images/theme/logo-190.png') }}" width="64" height="64" alt="Costs to Expect Logo"
title="Back to the dashboard"/><span class="d-none">C</span>osts to Expect.com</a>
</div>

Expand Down

0 comments on commit 0a5e18b

Please sign in to comment.