diff --git a/internal/store/sqlite/sqlite.go b/internal/store/sqlite/sqlite.go index 4aa3e32..635e5be 100644 --- a/internal/store/sqlite/sqlite.go +++ b/internal/store/sqlite/sqlite.go @@ -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)