Get list of tags from DB

This commit is contained in:
Mike Colagrosso 2024-06-13 00:46:21 -06:00 committed by Alex Cabal
parent b3a173aa91
commit 43416e76db

View file

@ -172,12 +172,17 @@ class Library{
} }
/** /**
* @return array<Tag> * @return array<EbookTag>
* @throws Exceptions\AppException
*/ */
public static function GetTags(): array{ public static function GetTags(): array{
/** @var array<Tag> */ $tags = Db::Query('
return self::GetFromApcu('tags'); SELECT distinct t.*
from Tags t
inner join EbookTags et using (TagId)
order by t.Name
', [], EbookTag::class);
return $tags;
} }
/** /**