Make sure bills API is consistent.

This commit is contained in:
James Cole
2018-02-11 07:46:34 +01:00
parent 9b3abd3b19
commit 2ef1022c92
9 changed files with 116 additions and 159 deletions

View File

@@ -41,11 +41,16 @@ class UserTransformer extends TransformerAbstract
{
return [
'id' => (int)$user->id,
'links' => [
'id' => (int)$user->id,
'updated_at' => $user->updated_at->toAtomString(),
'created_at' => $user->created_at->toAtomString(),
'email' => $user->email,
'blocked' => intval($user->blocked) === 1,
'blocked_code' => $user->blocked_code,
'links' => [
[
'rel' => 'self',
'uri' => '/user/' . $user->id,
'uri' => '/users/' . $user->id,
],
],
];