mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Merge pull request #10410 from mkllnk/api-customers-order
Sort customers by id on API v1
This commit is contained in:
@@ -61,7 +61,7 @@ module Api
|
||||
def search_customers
|
||||
customers = visible_customers.includes(:bill_address, :ship_address)
|
||||
customers = customers.where(enterprise_id: params[:enterprise_id]) if params[:enterprise_id]
|
||||
customers.ransack(params[:q]).result
|
||||
customers.ransack(params[:q]).result.order(:id)
|
||||
end
|
||||
|
||||
def visible_customers
|
||||
|
||||
Reference in New Issue
Block a user