API: Add link_type_id when reading TransactionLink

This commit is contained in:
Geoffrey “Frogeye” Preud'homme 2020-02-07 12:03:13 +01:00
parent cebc0d7568
commit 5aae8b7743

View File

@ -60,13 +60,14 @@ class TransactionLinkTransformer extends AbstractTransformer
{
$notes = $this->repository->getLinkNoteText($link);
$data = [
'id' => (int)$link->id,
'created_at' => $link->created_at->toAtomString(),
'updated_at' => $link->updated_at->toAtomString(),
'inward_id' => $link->source_id,
'outward_id' => $link->destination_id,
'notes' => '' === $notes ? null : $notes,
'links' => [
'id' => (int)$link->id,
'created_at' => $link->created_at->toAtomString(),
'updated_at' => $link->updated_at->toAtomString(),
'inward_id' => $link->source_id,
'outward_id' => $link->destination_id,
'link_type_id' => $link->link_type_id,
'notes' => '' === $notes ? null : $notes,
'links' => [
[
'rel' => 'self',
'uri' => '/transaction_links/' . $link->id,