mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 14:12:15 +00:00
Expand API
This commit is contained in:
@@ -212,6 +212,8 @@ class TransactionGroupTransformer extends AbstractTransformer
|
||||
'longitude' => $longitude,
|
||||
'latitude' => $latitude,
|
||||
'zoom_level' => $zoomLevel,
|
||||
|
||||
'has_attachments' => $this->hasAttachments((int)$row['transaction_journal_id']),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -248,6 +250,16 @@ class TransactionGroupTransformer extends AbstractTransformer
|
||||
return $this->groupRepos->getLocation($journalId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $journalId
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function hasAttachments(int $journalId): bool
|
||||
{
|
||||
return $this->groupRepos->countAttachments($journalId) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $array
|
||||
* @param string $key
|
||||
|
||||
Reference in New Issue
Block a user