Skip to content

Commit

Permalink
add missing properties
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Jul 25, 2023
1 parent cddd282 commit 20a55e8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Backend/View/Identity.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public function getCollection(int $categoryId, int $startIndex, int $count, ?str
'itemsPerPage' => $count,
'entry' => $builder->doCollection([$this->getTable(Table\Identity::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [
'id' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ID),
'roleId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ROLE_ID),
'appId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_APP_ID),
'status' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_STATUS),
'name' => Table\Generated\IdentityTable::COLUMN_NAME,
'icon' => Table\Generated\IdentityTable::COLUMN_ICON,
Expand All @@ -85,6 +87,8 @@ public function getEntity(string $id)

$definition = $builder->doEntity([$this->getTable(Table\Identity::class), 'findOneByIdentifier'], [$id], [
'id' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ID),
'roleId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ROLE_ID),
'appId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_APP_ID),
'status' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_STATUS),
'name' => Table\Generated\IdentityTable::COLUMN_NAME,
'icon' => Table\Generated\IdentityTable::COLUMN_ICON,
Expand Down
8 changes: 8 additions & 0 deletions tests/Backend/Api/Identity/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public function testGet()
"entry": [
{
"id": 1,
"roleId": 3,
"appId": 2,
"status": 1,
"name": "Facebook",
"icon": "bi-facebook",
Expand All @@ -62,6 +64,8 @@ public function testGet()
},
{
"id": 2,
"roleId": 3,
"appId": 2,
"status": 1,
"name": "GitHub",
"icon": "bi-github",
Expand All @@ -70,6 +74,8 @@ public function testGet()
},
{
"id": 3,
"roleId": 3,
"appId": 2,
"status": 1,
"name": "Google",
"icon": "bi-google",
Expand All @@ -78,6 +84,8 @@ public function testGet()
},
{
"id": 4,
"roleId": 3,
"appId": 2,
"status": 1,
"name": "OpenID",
"icon": "bi-openid",
Expand Down
4 changes: 4 additions & 0 deletions tests/Backend/Api/Identity/EntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public function testGet()
$expect = <<<'JSON'
{
"id": 2,
"roleId": 3,
"appId": 2,
"status": 1,
"name": "GitHub",
"icon": "bi-github",
Expand Down Expand Up @@ -92,6 +94,8 @@ public function testGetByName()
$expect = <<<'JSON'
{
"id": 2,
"roleId": 3,
"appId": 2,
"status": 1,
"name": "GitHub",
"icon": "bi-github",
Expand Down

0 comments on commit 20a55e8

Please sign in to comment.