X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e48cbc6a5f54a0e18dc581ccbac3b13284313125..97cb1fd7fa2916974538fde2a6ea311a3f793989:/app/controllers/changeset_controller.rb diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 3e88eeec3..9994a6b1e 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -54,6 +54,21 @@ class ChangesetController < ApplicationController render :nothing => true, :status => :not_found end end + + def close + begin + if not request.put? + render :nothing => true, :status => :method_not_allowed + return + end + changeset = Changeset.find(params[:id]) + changeset.open = false + changeset.save + render :nothing => true + rescue ActiveRecord::RecordNotFound + render :nothing => true, :status => :not_found + end + end def upload if not request.put?