Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Remove moving to root form API.
Matthew Kennedy599c858eda6e
diff --git a/api/app/controllers/spree/api/v2/platform/menu_items_controller.rb b/api/app/controllers/spree/api/v2/platform/menu_items_controller.rbindex 83894d5516..28e00dbd91 100644--- a/api/app/controllers/spree/api/v2/platform/menu_items_controller.rb+++ b/api/app/controllers/spree/api/v2/platform/menu_items_controller.rb@@ -5,14 +5,11 @@ module Spreeclass MenuItemsController < ResourceControllerdef reposition@moved_item = scope.find(params[:moved_item_id])- @new_parent = if params[:new_parent_id].nil?- nil- else- scope.find(params[:new_parent_id])- end+ @new_parent = scope.find(params[:new_parent_id])+ new_index = params[:new_position_idx].to_i- if @moved_item && @new_parent- @moved_item.move_to_child_with_index(@new_parent, params[:new_position_idx].to_i)+ if @moved_item && @new_parent && new_index+ @moved_item.move_to_child_with_index(@new_parent, new_index)elsehead :bad_requestend