]> git.openstreetmap.org Git - rails.git/commitdiff
Restore ordering of results from the users#index API call
authorTom Hughes <tom@compton.nu>
Sat, 26 Aug 2023 16:41:22 +0000 (17:41 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 26 Aug 2023 16:41:22 +0000 (17:41 +0100)
app/controllers/api/users_controller.rb

index 888753fe9f2a92d3230c83382c2c375654f40b85..ab48a518979427aba4e676b08238c025c838fda7 100644 (file)
@@ -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|