app/controllers/spree/api/v1/classifications_controller.rb in spree_api-4.2.7 vs app/controllers/spree/api/v1/classifications_controller.rb in spree_api-4.3.0.rc1

- old
+ new

@@ -7,12 +7,13 @@ authorize! :update, Taxon classification = Spree::Classification.find_by( product_id: params[:product_id], taxon_id: params[:taxon_id] ) - # Because position we get back is 0-indexed. - # acts_as_list is 1-indexed. - classification.insert_at(params[:position].to_i + 1) + Spree::Dependencies.classification_reposition_service.constantize.call( + classification: classification, + position: params[:position] + ) head :ok end end end end