sort by starred and then created_at to get board cover image

This commit is contained in:
maryhipp 2023-10-03 12:08:00 -04:00 committed by psychedelicious
parent f4ba7be918
commit 5a1019d858

View File

@ -584,7 +584,7 @@ class SqliteImageRecordStorage(ImageRecordStorageBase):
FROM images
JOIN board_images ON images.image_name = board_images.image_name
WHERE board_images.board_id = ?
ORDER BY images.created_at DESC
ORDER BY images.starred DESC, images.created_at DESC
LIMIT 1;
""",
(board_id,),