discourse-subscriptions/config/routes.rb

33 lines
942 B
Ruby
Raw Normal View History

2019-08-27 06:04:02 -04:00
# frozen_string_literal: true
require_dependency "subscriptions_user_constraint"
2019-08-27 06:04:02 -04:00
2019-12-03 19:23:45 -05:00
DiscourseSubscriptions::Engine.routes.draw do
scope "admin" do
get "/" => "admin#index"
post "/refresh" => "admin#refresh_campaign"
post "/create-campaign" => "admin#create_campaign"
2019-10-09 21:08:52 -04:00
end
namespace :admin, constraints: AdminConstraint.new do
2019-09-24 23:20:28 -04:00
resources :plans
resources :subscriptions, only: %i[index destroy]
2019-10-15 23:15:01 -04:00
resources :products
resources :coupons, only: %i[index create]
resource :coupons, only: %i[destroy update]
2019-09-24 23:20:28 -04:00
end
2019-10-31 22:43:09 -04:00
namespace :user do
2019-12-17 00:31:58 -05:00
resources :payments, only: [:index]
resources :subscriptions, only: %i[index update destroy]
2019-10-31 22:43:09 -04:00
end
get "/" => "subscribe#index"
get ".json" => "subscribe#index"
get "/contributors" => "subscribe#contributors"
get "/:id" => "subscribe#show"
post "/create" => "subscribe#create"
post "/finalize" => "subscribe#finalize"
post "/hooks" => "hooks#create"
2017-01-30 21:28:41 -05:00
end