mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Would be nice to remove the references as well...
This commit is contained in:
@@ -46,13 +46,13 @@ class TransactionJournalLink extends Model
|
||||
*/
|
||||
public static function routeBinder(string $value): TransactionJournalLink
|
||||
{
|
||||
if ($guard->check()) {
|
||||
if (auth()->check()) {
|
||||
$linkId = intval($value);
|
||||
$link = self::where('journal_links.id', $linkId)
|
||||
->leftJoin('transaction_journals as t_a', 't_a.id', '=', 'source_id')
|
||||
->leftJoin('transaction_journals as t_b', 't_b.id', '=', 'destination_id')
|
||||
->where('t_a.user_id', $guard->user()->id)
|
||||
->where('t_b.user_id', $guard->user()->id)
|
||||
->where('t_a.user_id', auth()->user()->id)
|
||||
->where('t_b.user_id', auth()->user()->id)
|
||||
->first(['journal_links.*']);
|
||||
if (!is_null($link)) {
|
||||
return $link;
|
||||
|
Reference in New Issue
Block a user