fix correct display recent
This commit is contained in:
parent
be069042ff
commit
4b80e8e8ed
@ -23,7 +23,10 @@ class RecentMapper extends QBMapper {
|
|||||||
public function find(int $id, string $userId): Station {
|
public function find(int $id, string $userId): Station {
|
||||||
/* @var $qb IQueryBuilder */
|
/* @var $qb IQueryBuilder */
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('*')
|
$qb->selectDistinct('stationuuid')
|
||||||
|
->addSelect('name')
|
||||||
|
->addSelect('favicon')
|
||||||
|
->addSelect('urlresolved')
|
||||||
->from('recent')
|
->from('recent')
|
||||||
->orderBy('id', 'DESC')
|
->orderBy('id', 'DESC')
|
||||||
->where($qb->expr()->eq('id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT)))
|
->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 {
|
public function findAll(string $userId): array {
|
||||||
/* @var $qb IQueryBuilder */
|
/* @var $qb IQueryBuilder */
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('*')
|
$qb->selectDistinct('stationuuid')
|
||||||
|
->addSelect('name')
|
||||||
|
->addSelect('favicon')
|
||||||
|
->addSelect('urlresolved')
|
||||||
->from('recent')
|
->from('recent')
|
||||||
->orderBy('id', 'DESC')
|
->orderBy('id', 'DESC')
|
||||||
->where($qb->expr()->eq('user_id', $qb->createNamedParameter($userId)));
|
->where($qb->expr()->eq('user_id', $qb->createNamedParameter($userId)));
|
||||||
|
Loading…
Reference in New Issue
Block a user