From: Tom Hughes Date: Sat, 26 Aug 2023 16:41:22 +0000 (+0100) Subject: Restore ordering of results from the users#index API call X-Git-Tag: live~684 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/c7a31ebc5d130bfebc21d04937bdc05f1370272c?hp=--cc Restore ordering of results from the users#index API call --- c7a31ebc5d130bfebc21d04937bdc05f1370272c diff --git a/app/controllers/api/users_controller.rb b/app/controllers/api/users_controller.rb index 888753fe9..ab48a5189 100644 --- a/app/controllers/api/users_controller.rb +++ b/app/controllers/api/users_controller.rb @@ -19,7 +19,7 @@ module Api raise OSM::APIBadUserInput, "No users were given to search for" if ids.empty? - @users = User.visible.where(:id => ids).order(:id) + @users = User.visible.where(:id => ids).in_order_of(:id, ids) # Render the result respond_to do |format|