mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
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