X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c2c58921122318a63828bf63a52bf1dd8d0fbd2b..423ae5f8e048c91c00d7c46c05c7b529cbe2f9c7:/app/controllers/api/changesets_controller.rb diff --git a/app/controllers/api/changesets_controller.rb b/app/controllers/api/changesets_controller.rb index 6eeb66e82..3d59eeb17 100644 --- a/app/controllers/api/changesets_controller.rb +++ b/app/controllers/api/changesets_controller.rb @@ -3,7 +3,6 @@ module Api class ChangesetsController < ApiController before_action :check_api_writable, :only => [:create, :update, :upload, :subscribe, :unsubscribe] - before_action :check_api_readable, :except => [:index, :create, :update, :upload, :download, :subscribe, :unsubscribe] before_action :setup_user_auth, :only => [:show] before_action :authorize, :only => [:create, :update, :upload, :close, :subscribe, :unsubscribe] @@ -66,7 +65,6 @@ module Api @comments = @comments.unscope(:where => :visible) if params[:show_hidden_comments].presence && can?(:restore, ChangesetComment) @comments = @comments.includes(:author) end - render "changeset" respond_to do |format| format.xml @@ -197,7 +195,7 @@ module Api check_changeset_consistency(@changeset, current_user) @changeset.update_from(new_changeset, current_user) - render "changeset" + render "show" respond_to do |format| format.xml @@ -223,7 +221,7 @@ module Api # Return a copy of the updated changeset @changeset = changeset - render "changeset" + render "show" respond_to do |format| format.xml @@ -249,7 +247,7 @@ module Api # Return a copy of the updated changeset @changeset = changeset - render "changeset" + render "show" respond_to do |format| format.xml @@ -332,7 +330,7 @@ module Api changesets.where("closed_at >= ? and created_at <= ?", from, to) else # if there is no comma, assume its a lower limit on time - changesets.where("closed_at >= ?", Time.parse(time).utc) + changesets.where(:closed_at => Time.parse(time).utc..) end # stupid Time seems to throw both of these for bad parsing, so # we have to catch both and ensure the correct code path is taken.