docbrown/app/controllers/api/v1/listings_controller.rb
Fernando Valverde 0d942e6161
API V1 skip authenticity token validation (#18142)
* Skip authenticity token on API V1

* Test execution experiment - should fail

* Fix specs test

* Remove listings v1 controller before_action hook
2022-07-20 07:51:33 -06:00

13 lines
497 B
Ruby

module Api
module V1
class ListingsController < ApiController
include Api::ListingsController
# actions `create` and `update` are defined in the module `ListingsToolkit`,
# we thus silence Rubocop lexical scope filter cop: https://rails.rubystyle.guide/#lexically-scoped-action-filter
before_action :authenticate!
before_action :set_cache_control_headers, only: %i[index show]
before_action :set_and_authorize_listing, only: %i[update]
end
end
end