Skip to content

armgit / spree

Public Imported from GitHub
0

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.

API V2: By default allow sorting by name and number columns

Damian Legawiec718de5e77eca
diff --git a/api/app/controllers/spree/api/v2/resource_controller.rb b/api/app/controllers/spree/api/v2/resource_controller.rb
index 4c10afff75..ede0b17411 100644
--- a/api/app/controllers/spree/api/v2/resource_controller.rb
+++ b/api/app/controllers/spree/api/v2/resource_controller.rb
@@ -23,7 +23,7 @@ module Spree
end
def default_sort_atributes
- [:id, :updated_at, :created_at]
+ [:id, :name, :number, :updated_at, :created_at]
end
def scope