Class: Spree::Api::StoreCreditEventsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/api/store_credit_events_controller.rb

Instance Attribute Summary

Attributes inherited from BaseController

#current_api_user

Instance Method Summary collapse

Instance Method Details

#mineObject



2
3
4
5
6
7
8
# File 'app/controllers/spree/api/store_credit_events_controller.rb', line 2

def mine
  if current_api_user
    @store_credit_events = current_api_user.store_credit_events.exposed_events.page(params[:page]).per(params[:per_page]).reverse_chronological
  else
    render "spree/api/errors/unauthorized", status: :unauthorized
  end
end