Api CSV exports
This commit is contained in:
@@ -6,7 +6,7 @@ module Dunlop::Ember::ApiBaseController
|
|||||||
before_action :authenticate_user!
|
before_action :authenticate_user!
|
||||||
before_action :set_current_user
|
before_action :set_current_user
|
||||||
before_action :find_record, only: %i[show update destroy]
|
before_action :find_record, only: %i[show update destroy]
|
||||||
respond_to :json
|
respond_to :json, :csv
|
||||||
rescue_from CanCan::AccessDenied do
|
rescue_from CanCan::AccessDenied do
|
||||||
render json: {errors: [{status: 403, detail: 'unauthorized'}]}, status: 403
|
render json: {errors: [{status: 403, detail: 'unauthorized'}]}, status: 403
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user