Skip to content

Commit

Permalink
Merge pull request #269 from deanblackborough/master
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
deanblackborough authored Jul 29, 2023
2 parents a10ba01 + 9df6060 commit 7c52bc3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

The complete changelog for the Costs to Expect REST API, our changelog follows the format defined at https://keepachangelog.com/en/1.0.0/

## [v3.14.2] - 2023-07-29
### Fixed
- Adjusted the structure of the collection for permitted users, user should be an object.

## [v3.14.1] - 2023-07-28
### Fixed
- User id not included in the permitted users responses.
Expand Down
8 changes: 5 additions & 3 deletions app/Transformer/PermittedUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ public function format(array $to_transform): void
{
$this->transformed = [
'id' => $this->hash->permittedUser()->encode($to_transform['permitted_user_id']),
'user_id' => $this->hash->user()->encode($to_transform['permitted_user_user_id']),
'name' => $to_transform['permitted_user_name'],
'email' => $to_transform['permitted_user_email'],
'user' => [
'id' => $this->hash->user()->encode($to_transform['permitted_user_user_id']),
'name' => $to_transform['permitted_user_name'],
'email' => $to_transform['permitted_user_email']
],
'created' => $to_transform['permitted_user_created_at']
];
}
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'=> 'v3.14.1',
'version'=> 'v3.14.2',
'prefix' => 'v3',
'release_date' => '2023-07-28',
'release_date' => '2023-07-29',
'changelog' => [
'api' => '/v3/changelog',
'markdown' => 'https://github.com/costs-to-expect/api/blob/master/CHANGELOG.md'
Expand Down
30 changes: 19 additions & 11 deletions public/api/schema/permitted-user.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,32 @@
"id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
"user": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
}
},
"required": [
"id",
"name",
"email"
]
},
"created": {
"type": "string"
}
},
"required": [
"id",
"user_id",
"name",
"email",
"user",
"created"
]
}

0 comments on commit 7c52bc3

Please sign in to comment.