[Directory] Almost finishied creating the /actors stream - problems with the css files

This commit is contained in:
Angelo D. Moura
2020-11-29 04:55:23 +00:00
committed by Hugo Sales
parent 517cba3510
commit 0c5941f515
5 changed files with 140 additions and 6 deletions

View File

@@ -141,8 +141,21 @@ END;
public function actors(Request $request)
{
return [
'_template' => 'network/public.html.twig',
];
if (Common::isLoggedIn()) {
$user_id = Common::ensureLoggedIn()->getId();
return [
'_template' => 'network/actors.html.twig',
'actors' => DB::dql('select a from App\Entity\GSActor a ' .
'where a.id != :id ' .
'order by a.created DESC', ['id' => $user_id]),
];
} else {
return [
'_template' => 'network/actors.html.twig',
'actors' => DB::dql('select a from App\Entity\GSActor a ' .
'order by a.created DESC'),
];
}
}
}