Class: Spree::Api::StoreCreditEventsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Spree::Api::StoreCreditEventsController
show all
- Defined in:
- app/controllers/spree/api/store_credit_events_controller.rb
Instance Attribute Summary
#current_api_user
Instance Method Summary
collapse
#map_nested_attributes_keys
Instance Method Details
#mine ⇒ Object
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
|