]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/changesets_controller.rb
Simplify deny_access handling
[rails.git] / app / controllers / api / changesets_controller.rb
index 92690a75ec36f671a8ee34178899b4d7c74e98a8..8841d4b3b23c8457b00664dd087da065b46e8d6e 100644 (file)
@@ -1,13 +1,11 @@
 # The ChangesetController is the RESTful interface to Changeset objects
 
 module Api
-  class ChangesetsController < ApplicationController
+  class ChangesetsController < ApiController
     layout "site"
     require "xml/libxml"
 
-    skip_before_action :verify_authenticity_token
     before_action :authorize, :only => [:create, :update, :upload, :close, :subscribe, :unsubscribe]
-    before_action :api_deny_access_handler, :only => [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox]
 
     authorize_resource
 
@@ -43,7 +41,7 @@ module Api
     def show
       @changeset = Changeset.find(params[:id])
       @include_discussion = params[:include_discussion].presence
-      render "changesets/changeset"
+      render "changeset"
     end
 
     ##
@@ -105,7 +103,7 @@ module Api
       # will include the bigger bounding box.
       cs.save!
       @changeset = cs
-      render "changesets/changeset"
+      render "changeset"
     end
 
     ##
@@ -222,7 +220,7 @@ module Api
 
       # preload users, tags and comments, and render result
       @changesets = changesets.preload(:user, :changeset_tags, :comments)
-      render "changesets/changesets"
+      render "changesets"
     end
 
     ##
@@ -242,7 +240,7 @@ module Api
 
       check_changeset_consistency(@changeset, current_user)
       @changeset.update_from(new_changeset, current_user)
-      render "changesets/changeset"
+      render "changeset"
     end
 
     ##
@@ -263,7 +261,7 @@ module Api
 
       # Return a copy of the updated changeset
       @changeset = changeset
-      render "changesets/changeset"
+      render "changeset"
     end
 
     ##
@@ -284,7 +282,7 @@ module Api
 
       # Return a copy of the updated changeset
       @changeset = changeset
-      render "changesets/changeset"
+      render "changeset"
     end
 
     private