Skip to content

Commit

Permalink
only serialize country code on basic serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Sep 9, 2024
1 parent 6ef88ba commit 1eab225
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/Api/Serializer/BasicIPInfoSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ protected function getDefaultAttributes($ip): array

return [
'countryCode' => $ip->country_code,
'dataProvider' => $ip->data_provider,
'createdAt' => $this->formatDate($ip->created_at),
'updatedAt' => $this->formatDate($ip->updated_at),
];
}

Expand Down
3 changes: 3 additions & 0 deletions src/Api/Serializer/IPInfoSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ protected function getDefaultAttributes($ip): array
'threatLevel' => $ip->threat_level,
'threatType' => $ip->threat_types,
'error' => $ip->error,
'dataProvider' => $ip->data_provider,
'createdAt' => $this->formatDate($ip->created_at),
'updatedAt' => $this->formatDate($ip->updated_at),
];

return array_merge($attrs, $moreAttrs);
Expand Down

0 comments on commit 1eab225

Please sign in to comment.