- before_filter :authorize
- after_filter :compress_output
-\r
- def create
- if request.put?
- way = Way.from_xml(request.raw_post, true)
-
- if way
- way.user_id = @user.id
- unless way.preconditions_ok? # are the segments (and their nodes) visible?
- render :nothing => true, :status => 412
- return
- end
+ skip_before_action :verify_authenticity_token
+ before_action :authorize, :only => [:create, :update, :delete]
+ before_action :require_allow_write_api, :only => [:create, :update, :delete]
+ before_action :require_public_data, :only => [:create, :update, :delete]
+ before_action :check_api_writable, :only => [:create, :update, :delete]
+ before_action :check_api_readable, :except => [:create, :update, :delete]
+ around_action :api_call_handle_error, :api_call_timeout