Skip to content

Firefly III: a personal finances manager

API: Add link_type_id when reading TransactionLink

Geoffrey “Frogeye” Preud'homme5aae8b77436c
diff --git a/app/Transformers/TransactionLinkTransformer.php b/app/Transformers/TransactionLinkTransformer.php
index 204e5d7cd2..319859f32a 100644
--- a/app/Transformers/TransactionLinkTransformer.php
+++ b/app/Transformers/TransactionLinkTransformer.php
@@ -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,