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



4
5
6
7
8
9
10
11
12
# File 'app/controllers/spree/api/store_credit_events_controller.rb', line 4

def mine
  if current_api_user
    @store_credit_events = paginate(
      current_api_user.store_credit_events.exposed_events
    ).reverse_chronological
  else
    render "spree/api/errors/unauthorized", status: :unauthorized
  end
end