From e7c8ca50dbac821b523ac3642d51b322d753e106 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 19 Jul 2016 10:07:56 +0300 Subject: [PATCH] API optimization --- app/Ninja/Transformers/InvitationTransformer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Ninja/Transformers/InvitationTransformer.php b/app/Ninja/Transformers/InvitationTransformer.php index f50932762a..8ac25d5766 100644 --- a/app/Ninja/Transformers/InvitationTransformer.php +++ b/app/Ninja/Transformers/InvitationTransformer.php @@ -6,6 +6,8 @@ class InvitationTransformer extends EntityTransformer { public function transform(Invitation $invitation) { + $invitation->setRelation('account', $this->account); + return [ 'id' => (int) $invitation->public_id, 'key' => $invitation->getName(), @@ -15,4 +17,4 @@ class InvitationTransformer extends EntityTransformer 'viewed_date' => $invitation->sent_date, ]; } -} \ No newline at end of file +}