summaryrefslogtreecommitdiff
path: root/config/routes.rb
blob: 147f747f0b7d0207b4b0d214b0505906949dddf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# frozen_string_literal: true

SolidusSubscriptions::Engine.routes.draw do
  namespace :api, defaults: { format: :json } do
    namespace :v1 do
      resources :line_items, only: [:update, :destroy]
      resources :subscriptions, only: [:update] do
        member do
          post :cancel
          post :skip
        end
      end
    end
  end
end

Spree::Core::Engine.routes.draw do
  mount SolidusSubscriptions::Engine, at: '/subscriptions'

  namespace :admin do
    resources :subscriptions, only: [:index, :new, :create, :edit, :update] do
      delete :cancel, on: :member
      post :activate, on: :member
      post :skip, on: :member
      resources :installments, only: [:index, :show]
      resources :subscription_events, only: :index
    end
  end
end