List artwork by artist via /artworks/<artist-name>

This commit is contained in:
Mike Colagrosso 2024-01-22 21:24:01 -07:00 committed by Alex Cabal
parent 780be15ed0
commit cad2f5f730
8 changed files with 63 additions and 12 deletions

View file

@ -247,6 +247,20 @@ class Library{
return $artworks;
}
/**
* @return array<Artwork>
*/
public static function GetArtworkByArtist(string $artistUrlName): array{
$artworks = Db::Query('
SELECT art.*
from Artworks art
inner join Artists a using (ArtistId)
where a.UrlName = ?
order by art.Created desc', [$artistUrlName], 'Artwork');
return $artworks;
}
/**
* @return array<mixed>
*/