[CONTROLLER][ROUTE] Favourites page initial query implementation and routing

This commit is contained in:
rainydaysavings
2020-09-05 05:10:33 +01:00
committed by Hugo Sales
parent 651ec890d6
commit 492360ceeb
3 changed files with 15 additions and 1 deletions

View File

@@ -120,4 +120,17 @@ END;
),
];
}
public function favourites(Request $request)
{
$actor_id = Common::ensureLoggedIn()->getActor()->getId();
return [
'_template' => 'network/public.html.twig',
'notes' => DB::dql('select f from App\Entity\Favourite f ' .
'where f.gsactor_id = ' . $actor_id .
'order by f.created DESC'
),
];
}
}