fix: list items are now ordered by modified_at

This commit is contained in:
2026-08-21 20:56:53 +02:00
parent 3c5c8a7fe7
commit 3c13e13c2e
+1 -1
View File
@@ -177,7 +177,7 @@ func (r *ListRepo) SetListItemCompleted(ctx context.Context, listItemID string,
func (r *ListRepo) GetListItems(ctx context.Context, listID string) ([]domain.ListItem, error) { func (r *ListRepo) GetListItems(ctx context.Context, listID string) ([]domain.ListItem, error) {
rows, err := r.db.QueryContext(ctx, rows, err := r.db.QueryContext(ctx,
"SELECT id, title, is_completed, created_at, modified_at FROM list_items WHERE list_id = $1", "SELECT id, title, is_completed, created_at, modified_at FROM list_items WHERE list_id = $1 ORDER BY modified_at DESC",
listID, listID,
) )
if err != nil { if err != nil {