update list images endpoint to sort by pinnedness and then created_at

This commit is contained in:
maryhipp 2023-08-14 11:30:05 -07:00 committed by psychedelicious
parent a512fdc0f6
commit ee6a26a97d

View File

@ -426,7 +426,7 @@ class SqliteImageRecordStorage(ImageRecordStorageBase):
query_params.append(board_id)
query_pagination = """--sql
ORDER BY images.created_at DESC LIMIT ? OFFSET ?
ORDER BY images.pinned DESC, images.created_at DESC LIMIT ? OFFSET ?
"""
# Final images query with pagination