I want my notes sorted

This commit is contained in:
Micheal Wilkinson
2026-03-18 00:33:56 +00:00
parent bc291a6941
commit 981142eb60

View File

@@ -134,7 +134,7 @@ func (s *SQLiteStore) GetNoteByID(ctx context.Context, id int) (models.Note, err
func (s *SQLiteStore) GetAllNotes(ctx context.Context) ([]models.Note, error) {
rows, err := s.read.QueryContext(ctx, `
SELECT id, content, last_update FROM notes ORDER BY last_update DESC;
SELECT id, content, last_update FROM notes ORDER BY id ASC;
`)
if err != nil {
return nil, fmt.Errorf("failed to query all notes: %w", err)