diff --git a/lib/Db/RecentMapper.php b/lib/Db/RecentMapper.php index 10a3dd2..afbbd5d 100644 --- a/lib/Db/RecentMapper.php +++ b/lib/Db/RecentMapper.php @@ -23,7 +23,10 @@ class RecentMapper extends QBMapper { public function find(int $id, string $userId): Station { /* @var $qb IQueryBuilder */ $qb = $this->db->getQueryBuilder(); - $qb->select('*') + $qb->selectDistinct('stationuuid') + ->addSelect('name') + ->addSelect('favicon') + ->addSelect('urlresolved') ->from('recent') ->orderBy('id', 'DESC') ->where($qb->expr()->eq('id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT))) @@ -38,7 +41,10 @@ class RecentMapper extends QBMapper { public function findAll(string $userId): array { /* @var $qb IQueryBuilder */ $qb = $this->db->getQueryBuilder(); - $qb->select('*') + $qb->selectDistinct('stationuuid') + ->addSelect('name') + ->addSelect('favicon') + ->addSelect('urlresolved') ->from('recent') ->orderBy('id', 'DESC') ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($userId)));