chore: filter to query

This commit is contained in:
Cory Dransfeldt 2024-10-13 15:10:37 -07:00
parent eec1caa321
commit ed65bb8127
No known key found for this signature in database
5 changed files with 8 additions and 13 deletions

View file

@ -41,6 +41,7 @@ SELECT
'id', c.id,
'date', c.date,
'venue_name', v.name,
'venue_name_short', trim(split_part(v.name, ',', 1)),
'venue_latitude', v.latitude,
'venue_longitude', v.longitude,
'notes', c.notes
@ -65,9 +66,7 @@ SELECT
SELECT json_agg(json_build_object(
'title', m.title,
'year', m.year,
'url', m.slug,
'rating', m.rating,
'favorite', m.favorite
'url', m.slug
) ORDER BY m.year DESC)
FROM movies_artists ma
LEFT JOIN movies m ON ma.movies_id = m.id