]> git.openstreetmap.org Git - rails.git/commitdiff
Sort changesets by creation time
authorAnton Khorev <tony29@yandex.ru>
Tue, 15 Aug 2023 15:33:51 +0000 (18:33 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 15 Aug 2023 16:29:06 +0000 (19:29 +0300)
app/controllers/api/changesets_controller.rb

index 0a49a95f4e01e98a99c07566f6da92282448e09b..8a1b9f55bc779993d296f823afb286976becd98c 100644 (file)
@@ -172,9 +172,9 @@ module Api
 
       # sort the changesets
       changesets = if params[:order] == "oldest"
 
       # sort the changesets
       changesets = if params[:order] == "oldest"
-                     changesets.order(:closed_at => :asc)
+                     changesets.order(:created_at => :asc)
                    else
                    else
-                     changesets.order(:closed_at => :desc)
+                     changesets.order(:created_at => :desc)
                    end
 
       # limit the result
                    end
 
       # limit the result